%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/image-mode.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require image exif] 2) #@111 Alist of windows to window properties. Each element has the form (WINDOW . ALIST). See `image-mode-winprops'. (defvar image-mode-winprops-alist t (#$ . 473)) (make-variable-buffer-local 'image-mode-winprops-alist) #@118 Special hook run when image data is requested in a new window. It is called with one argument, the initial WINPROPS. (defvar image-mode-new-window-functions nil (#$ . 694)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \210\300\314\302\303\315DD\316\306\317\310\311\312\313& \207" [custom-declare-variable image-auto-resize funcall function #[0 "\300\207" [t] 1] "Non-nil to resize the image upon first display.\nIts value should be one of the following:\n - nil, meaning no resizing.\n - t, meaning to fit the image to the window height and width.\n - `fit-height', meaning to fit the image to the window height.\n - `fit-width', meaning to fit the image to the window width.\n - A number, which is a scale factor (the default size is 1)." :type (choice (const :tag "No resizing" nil) (other :tag "Fit height and width" t) (const :tag "Fit height" fit-height) (const :tag "Fit width" fit-width) (number :tag "Scale factor" 1)) :version "27.1" :group image image-auto-resize-on-window-resize #[0 "\300\207" [1] 1] "Non-nil to resize the image whenever the window's dimensions change.\nThis will always keep the image fit to the window.\nWhen non-nil, the value should be a number of seconds to wait before\nresizing according to the value specified in `image-auto-resize'." (choice (const :tag "No auto-resize on window size change" nil) (integer :tag "Wait for number of seconds before resize" 1))] 10) #@351 The image resize operation. Its value should be one of the following: - nil, meaning no resizing. - t, meaning to fit the image to the window height and width. - `fit-height', meaning to fit the image to the window height. - `fit-width', meaning to fit the image to the window width. - A number, which is a scale factor (the default size is 1). (defvar image-transform-resize nil (#$ . 2123)) (make-variable-buffer-local 'image-transform-resize) #@48 The scale factor of the image being displayed. (defvar image-transform-scale 1.0 (#$ . 2580)) (make-variable-buffer-local 'image-transform-scale) #@64 Rotation angle for the image in the current Image mode buffer. (defvar image-transform-rotation 0.0 (#$ . 2732)) (make-variable-buffer-local 'image-transform-rotation) #@164 Snap distance to a multiple of a right angle. There's no deep theory behind the default value, it should just be somewhat larger than ImageMagick's MagickEpsilon. (defvar image-transform-right-angle-fudge 0.0001 (#$ . 2907)) #@262 Return winprops of WINDOW. A winprops object has the shape (WINDOW . ALIST). WINDOW defaults to `selected-window' if it displays the current buffer, and otherwise it defaults to t, used for times when the buffer is not displayed. (fn &optional WINDOW CLEANUP) (defalias 'image-mode-winprops #[512 "\204 p\301 =\203 \302 \202 \303\262\202' \303=\204' \304!\204' \305\306\"\210\211\2033 \307\310\311\312\"\"\236\211\203D \211\307\"B\202V \313@A!B\262\211B\314\315\"\210\211\207" [image-mode-winprops-alist window-buffer selected-window t windowp error "Not a window: %s" delq nil mapcar #[257 "\211\242\300!\203 \301!\205 \207" [windowp window-live-p] 4 "\n\n(fn WINPROP)"] copy-alist run-hook-with-args image-mode-new-window-functions] 7 (#$ . 3139)]) #@32 (fn PROP &optional WINPROPS) (defalias 'image-mode-window-get #[513 "\211:\204\n \300!\262A\236A\207" [image-mode-winprops] 4 (#$ . 3923)]) (byte-code "\300\301\302\303#\300\207" [function-put image-mode-window-get gv-expander #[385 "\300\301\302$\207" [gv--defsetter image-mode-window-get #[770 "\300F\207" [image-mode-window-put] 7 "\n\n(fn VAL PROP &optional WINPROPS)"]] 7 "\n\n(fn DO &rest ARGS)"]] 4) #@36 (fn PROP VAL &optional WINPROPS) (defalias 'image-mode-window-put #[770 "\211:\204\n \300!\262\211@\301=\204 \302\301#\210\211B\303A\236A\"B\241\207" [image-mode-winprops t image-mode-window-put delq] 8 (#$ . 4347)]) #@16 (fn VSCROLL) (defalias 'image-set-window-vscroll #[257 "\300\301\302#\210\303\304 \305#\207" [image-mode-window-put vscroll nil set-window-vscroll selected-window t] 5 (#$ . 4582)]) #@13 (fn NCOL) (defalias 'image-set-window-hscroll #[257 "\300\301\302#\210\303\304 \"\207" [image-mode-window-put hscroll nil set-window-hscroll selected-window] 5 (#$ . 4774)]) (defalias 'image-mode-reapply-winprops #[0 "<\205, \301\302\303\"\304\305\"\304\306\"\307 \205* \203 \310\311 \"\210\211\205* \312\311 \303#\266\203\207" [image-mode-winprops-alist image-mode-winprops nil t image-mode-window-get hscroll vscroll image-get-display-property set-window-hscroll selected-window set-window-vscroll] 7]) (defalias 'image-mode-setup-winprops #[0 "<\204 \301\302\303\304\301\305$\207" [image-mode-winprops-alist nil add-hook window-configuration-change-hook image-mode-reapply-winprops t] 5]) (defalias 'image-get-display-property #[0 "\300e\301\302 p=\205\f \303 #\207" [get-char-property display window-buffer selected-window] 5]) #@647 Wrapper around `image-size', handling slice display properties. Like `image-size', the return value is (WIDTH . HEIGHT). WIDTH and HEIGHT are in canonical character units if PIXELS is nil, and in pixel units if PIXELS is non-nil. If SPEC is an image display property, this function is equivalent to `image-size'. If SPEC represents an xwidget object, defer to `xwidget-info'. If SPEC is a list of properties containing `image' and `slice' properties, return the display size taking the slice property into account. If the list contains `image' but not `slice', return the `image-size' of the specified image. (fn SPEC &optional PIXELS FRAME) (defalias 'image-display-size #[769 "@\300=\203 \301\302e!!\211\303H\304HB\207@\305=\203! \306#\207\307\305\"\307\310\"\203U \211\203U \203? \3048\3118B\202f \312\3048!\313!\245\312\3118!\314!\245B\202f \203a \306#\202f \315\316\"\207" [xwidget xwidget-info xwidget-at 2 3 image image-size assoc slice 4 float frame-char-width frame-char-height error "Invalid image specification: %s"] 9 (#$ . 5627)]) #@133 Scroll image in current window to the left by N character widths. Stop if the right edge of the image is reached. (fn &optional N) (defalias 'image-forward-hscroll #[256 "\211\300U\203 \301\207\211\300W\203 \302\300\303 \\]!\207\304 \305 \3068@Z\307\310!@!\302\300Z]\303 \\^!\207" [0 nil image-set-window-hscroll window-hscroll image-get-display-property window-inside-edges 2 ceiling image-display-size] 9 (#$ . 6705) "p"]) #@133 Scroll image in current window to the right by N character widths. Stop if the left edge of the image is reached. (fn &optional N) (defalias 'image-backward-hscroll #[256 "\300[!\207" [image-forward-hscroll] 3 (#$ . 7148) "p"]) #@108 Scroll image in current window upward by N lines. Stop if the bottom edge of the image is reached. (fn N) (defalias 'image-next-line #[257 "\211\300 _\262\211\301U\203 \302\207\211\301W\203 \303\301\304\302\305\"\\]!\207\306 \307\302\305\211#\3108A@Z\311\312\305\"A!\303\301Z]\304\302\305\"\\^!\207" [frame-char-height 0 nil image-set-window-vscroll window-vscroll t image-get-display-property window-edges 3 ceiling image-display-size] 11 (#$ . 7385) "p"]) #@117 Scroll image in current window downward by N lines. Stop if the top edge of the image is reached. (fn &optional N) (defalias 'image-previous-line #[256 "\300[!\207" [image-next-line] 3 (#$ . 7862) "p"]) #@426 Scroll image in current window upward by N lines. Stop if the bottom edge of the image is reached. If ARG is omitted or nil, scroll upward by a near full screen. A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll downward. If ARG is the atom `-', scroll downward by nearly full screen. When calling from a program, supply as argument a number, nil, or `-'. (fn &optional N) (defalias 'image-scroll-up #[256 "\211\204 \301 \3028A@Z\303\304Z]!\207\211\305=\203, \301 \3028A@Z\303\304Z^!\207\303\306!!\207" [next-screen-context-lines window-inside-edges 3 image-next-line 0 - prefix-numeric-value] 7 (#$ . 8074) "P"]) #@423 Scroll image in current window downward by N lines. Stop if the top edge of the image is reached. If ARG is omitted or nil, scroll downward by a near full screen. A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll upward. If ARG is the atom `-', scroll upward by nearly full screen. When calling from a program, supply as argument a number, nil, or `-'. (fn &optional N) (defalias 'image-scroll-down #[256 "\211\204 \301 \3028A@Z\303\304Z^!\207\211\305=\203, \301 \3028A@Z\303\304Z]!\207\303\306![!\207" [next-screen-context-lines window-inside-edges 3 image-next-line 0 - prefix-numeric-value] 7 (#$ . 8757) "P"]) #@424 Scroll image in current window leftward by N character widths. Stop if the right edge of the image is reached. If ARG is omitted or nil, scroll leftward by a near full screen. A near full screen is 2 columns less than a full screen. Negative ARG means scroll rightward. If ARG is the atom `-', scroll rightward by nearly full screen. When calling from a program, supply as argument a number, nil, or `-'. (fn &optional N) (defalias 'image-scroll-left #[256 "\211\204 \300 \3018@Z\302\303\301Z]!\207\211\304=\203* \300 \3018@Z\302\303\301Z^!\207\302\305!!\207" [window-inside-edges 2 image-forward-hscroll 0 - prefix-numeric-value] 7 (#$ . 9440) "P"]) #@414 Scroll image in current window rightward by N character widths. Stop if the left edge of the image is reached. If ARG is omitted or nil, scroll downward by a near full screen. A near full screen is 2 less than a full screen. Negative ARG means scroll leftward. If ARG is the atom `-', scroll leftward by nearly full screen. When calling from a program, supply as argument a number, nil, or `-'. (fn &optional N) (defalias 'image-scroll-right #[256 "\211\204 \300 \3018@Z\302\303\301Z^!\207\211\304=\203* \300 \3018@Z\302\303\301Z]!\207\302\305![!\207" [window-inside-edges 2 image-forward-hscroll 0 - prefix-numeric-value] 7 (#$ . 10107) "P"]) #@210 Scroll horizontally to the left edge of the image in the current window. With argument ARG not nil or 1, move forward ARG - 1 lines first, stopping if the top or bottom edge of the image is reached. (fn ARG) (defalias 'image-bol #[257 "\211\203 \300!\211\262\301U\204 \302S!\210\303\304!\207" [prefix-numeric-value 1 image-next-line image-set-window-hscroll 0] 3 (#$ . 10767) "p"]) #@211 Scroll horizontally to the right edge of the image in the current window. With argument ARG not nil or 1, move forward ARG - 1 lines first, stopping if the top or bottom edge of the image is reached. (fn ARG) (defalias 'image-eol #[257 "\211\203 \300!\211\262\301U\204 \302S!\210\303 \304 \3058@Z\306\307!@!\310\311Z]!\207" [prefix-numeric-value 1 image-next-line image-get-display-property window-inside-edges 2 ceiling image-display-size image-set-window-hscroll 0] 9 (#$ . 11162) "p"]) #@67 Scroll to the top-left corner of the image in the current window. (defalias 'image-bob #[0 "\300\301!\210\302\301!\207" [image-set-window-hscroll 0 image-set-window-vscroll] 2 (#$ . 11668) nil]) #@71 Scroll to the bottom-right corner of the image in the current window. (defalias 'image-eob #[0 "\300 \301 \302\303\304\211#\3058@Z\306\307!@!\3108A@Z\306\307\304\"A!\311\312Z]!\210\313\312Z]!\207" [image-get-display-property window-inside-edges window-edges nil t 2 ceiling image-display-size 3 image-set-window-hscroll 0 image-set-window-vscroll] 11 (#$ . 11869) nil]) #@365 Fit FRAME to the current image. If FRAME is omitted or nil, it defaults to the selected frame. All other windows on the frame are deleted. If called interactively, or if TOGGLE is non-nil, toggle between fitting FRAME to the current image and restoring the size and window configuration prior to the last `image-mode-fit-frame' call. (fn &optional FRAME TOGGLE) (defalias 'image-mode-fit-frame #[512 "p\300 \301!\302\303\"\304!\305!\306!\307 p\310\311\312\313\314\"\315\"\316$\216\317\2060 \307 \320\"\210 \203p \203p @@U\203p @AU\203p \321A@@\"\210\322A@A\"\210\323\3248!\210\325\303\326#\202\276 \327 \210\330 \331\211#\210\332 \3248@Z\3168A@Z\321\333\334 @!\n[#\"\210\322\333\334 A! [#\"\210\325\303\305 \306 B\n\nB\fE#\266\203)\266\202\207" [image-get-display-property image-display-size frame-parameter image-mode-saved-params current-window-configuration frame-width frame-height selected-frame make-byte-code 0 "\302\300!\203 \303\300\304\"\210\305\301!\205 \301q\207" vconcat vector [frame-live-p select-frame norecord buffer-live-p] 3 select-frame norecord set-frame-width set-frame-height set-window-configuration 2 set-frame-parameter nil delete-other-windows switch-to-buffer t window-inside-edges + ceiling] 20 (#$ . 12258) (list nil t)]) #@51 The image type for the current Image mode buffer. (defvar image-type nil (#$ . 13573)) (make-variable-buffer-local 'image-type) #@73 Non-nil if image for the current Image mode buffer has multiple frames. (defvar image-multi-frame nil (#$ . 13707)) (make-variable-buffer-local 'image-multi-frame) #@31 Mode keymap for `image-mode'. (defvar image-mode-map (byte-code "\302 \303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\303\316\317#\210\303\320\321#\210\303\322\323#\210\303\324\325#\210\303\326\327#\210\303\330\331#\210\303\332\333#\210\303\334\335#\210\303\336\337#\210\303\340\341#\210\303\342\343#\210\303\344\345#\210\303\346\347#\210\303\350\351#\210\303\352\353#\210\303\354\355#\210\303\356\357#\210\303\360\361#\210\303\362\363#\210\303\364\365#\210\303\366\365#\210\303\367\370#\210\303\371\372#\210\303\373\370#\210\303\374\372#\210\303\375\376#\210\303\377\201@ #\210\303\201A \363#\210\303\201B \365#\210\303\201C \363#\210\303\201D \365#\210\303\201E \201F #\210\303\201G \201H #\210\303\201I \201J #\210\303\201K \201L #\210\303\201M \201N #\210\303\201O \201P #\210\201Q \201R !\210\201S \201T \201U \201V $\210\201W D \"\207" [image-map special-mode-map make-sparse-keymap define-key "" image-toggle-display "" image-toggle-hex-display "sf" image-mode-fit-frame "sh" image-transform-fit-to-height "sw" image-transform-fit-to-width "sb" image-transform-fit-both "ss" image-transform-set-scale "sr" image-transform-set-rotation "so" image-transform-original "s0" image-transform-reset " " image-toggle-animation "F" image-goto-frame "f" image-next-frame "b" image-previous-frame "a+" image-increase-speed "a-" image-decrease-speed "a0" image-reset-speed "ar" image-reverse-speed "n" image-next-file "p" image-previous-file "w" image-mode-copy-file-name-as-kill "m" image-mode-mark-file "u" image-mode-unmark-file " " image-scroll-up [33554464] image-scroll-down "" [remap forward-char] image-forward-hscroll [remap backward-char] image-backward-hscroll [remap right-char] [remap left-char] [remap previous-line] image-previous-line [remap next-line] image-next-line [remap scroll-up] [remap scroll-down] [remap scroll-up-command] [remap scroll-down-command] [remap scroll-left] image-scroll-left [remap scroll-right] image-scroll-right [remap move-beginning-of-line] image-bol [remap move-end-of-line] image-eol [remap beginning-of-buffer] image-bob [remap end-of-buffer] image-eob (lambda (#1=#:def-tmp-var) (defvar image-mode-menu #1# #2="Menu for Image mode.")) nil easy-menu-do-define image-mode-menu #2# ("Image" ["Show as Text" image-toggle-display :active t :help "Show image as text"] ["Show as Hex" image-toggle-hex-display :active t :help "Show image as hex"] "--" ["Fit Frame to Image" image-mode-fit-frame :active t :help "Resize frame to match image"] ["Fit Image to Window (Best Fit)" image-transform-fit-both :help "Resize image to match the window height and width"] ["Fit to Window Height" image-transform-fit-to-height :help "Resize image to match the window height"] ["Fit to Window Width" image-transform-fit-to-width :help "Resize image to match the window width"] ["Zoom In" image-increase-size :help "Enlarge the image"] ["Zoom Out" image-decrease-size :help "Shrink the image"] ["Set Scale..." image-transform-set-scale :help "Resize image by specified scale factor"] ["Rotate Clockwise" image-rotate :help "Rotate the image"] ["Set Rotation..." image-transform-set-rotation :help "Set rotation angle of the image"] ["Original Size" image-transform-original :help "Reset image to actual size"] ["Reset to Default Size" image-transform-reset :help "Reset all image transformations to initial size"] "--" ["Show Thumbnails" (lambda nil (interactive) (image-dired default-directory)) :active default-directory :help "Show thumbnails for all images in this directory"] ["Previous Image" image-previous-file :active buffer-file-name :help "Move to previous image in this directory"] ["Next Image" image-next-file :active buffer-file-name :help "Move to next image in this directory"] ["Copy File Name" image-mode-copy-file-name-as-kill :active buffer-file-name :help "Copy the current file name to the kill ring"] "--" ["Animate Image" image-toggle-animation :style toggle :selected (let ((image (image-get-display-property))) (and image (image-animate-timer image))) :active image-multi-frame :help "Toggle image animation"] ["Loop Animation" (lambda nil (interactive) (setq image-animate-loop (not image-animate-loop)) (when (let ((image (image-get-display-property))) (and image (image-animate-timer image))) (image-toggle-animation) (image-toggle-animation))) :style toggle :selected image-animate-loop :active image-multi-frame :help "Animate images once, or forever?"] ["Reverse Animation" image-reverse-speed :style toggle :selected (let ((image (image-get-display-property))) (and image (< (image-animate-get-speed image) 0))) :active image-multi-frame :help "Reverse direction of this image's animation?"] ["Speed Up Animation" image-increase-speed :active image-multi-frame :help "Speed up this image's animation"] ["Slow Down Animation" image-decrease-speed :active image-multi-frame :help "Slow down this image's animation"] ["Reset Animation Speed" image-reset-speed :active image-multi-frame :help "Reset the speed of this image's animation"] ["Previous Frame" image-previous-frame :active image-multi-frame :help "Show the previous frame of this image"] ["Next Frame" image-next-frame :active image-multi-frame :help "Show the next frame of this image"] ["Goto Frame..." image-goto-frame :active image-multi-frame :help "Show a specific frame of this image"]) make-composed-keymap] 6) (#$ . 13877)) #@37 Mode keymap for `image-minor-mode'. (defvar image-minor-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\211\207" [make-sparse-keymap define-key "" image-toggle-display "" image-toggle-hex-display] 5) (#$ . 19318)) (put 'image-mode 'mode-class 'special) #@229 Major mode for image files. You can use \<image-mode-map>\[image-toggle-display] or \<image-mode-map>\[image-toggle-hex-display] to toggle between display as an image and display as text or hex. Key bindings: \{image-mode-map} (defalias 'image-mode #[0 "\306 \204 \307\310!\210\311 \210\312 \313 \204c \3141>