diff options
| author | Stefan Kangas | 2022-08-18 19:21:32 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-08-18 19:21:32 +0200 |
| commit | f97668c38fe4b503d14200baa4fe9627c2cbcb1b (patch) | |
| tree | 9e15e1dddd4efe0105c7c4dfeed95894927bbf31 | |
| parent | f98276f77b4e2cbf37e4d24387d21b48e9fd6144 (diff) | |
| parent | ef1e68f11d9c5a4c66fa3b28c116ed3038a56496 (diff) | |
| download | emacs-f97668c38fe4b503d14200baa4fe9627c2cbcb1b.tar.gz emacs-f97668c38fe4b503d14200baa4fe9627c2cbcb1b.zip | |
Merge from origin/emacs-28
ef1e68f11d * lisp/image-mode.el (image-mode-as-hex): Fix toggle instr...
dc0fce3a7d ; lisp/image-mode.el: Fix typo.
254ba1d3e5 * lisp/image-mode.el: Improve commentary.
ac43ac1af9 cl-reduce doc string improvement
| -rw-r--r-- | lisp/emacs-lisp/cl-seq.el | 4 | ||||
| -rw-r--r-- | lisp/image-mode.el | 20 |
2 files changed, 14 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index 64ae05bf2a0..60e204eaf51 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el | |||
| @@ -139,6 +139,10 @@ only case where FUNCTION is called with fewer than two arguments. | |||
| 139 | If SEQ contains exactly one element and no :INITIAL-VALUE is | 139 | If SEQ contains exactly one element and no :INITIAL-VALUE is |
| 140 | specified, then return that element and FUNCTION is not called. | 140 | specified, then return that element and FUNCTION is not called. |
| 141 | 141 | ||
| 142 | If :FROM-END is non-nil, the reduction occurs from the back of | ||
| 143 | the SEQ moving forward, and the order of arguments to the | ||
| 144 | FUNCTION is also reversed. | ||
| 145 | |||
| 142 | \n(fn FUNCTION SEQ [KEYWORD VALUE]...)" | 146 | \n(fn FUNCTION SEQ [KEYWORD VALUE]...)" |
| 143 | (cl--parsing-keywords (:from-end (:start 0) :end :initial-value :key) () | 147 | (cl--parsing-keywords (:from-end (:start 0) :end :initial-value :key) () |
| 144 | (or (listp cl-seq) (setq cl-seq (append cl-seq nil))) | 148 | (or (listp cl-seq) (setq cl-seq (append cl-seq nil))) |
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 46c555df278..76c076818f8 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -23,10 +23,14 @@ | |||
| 23 | 23 | ||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;; Defines a major mode for visiting image files | 26 | ;; Defines `image-mode', a major mode for visiting image files. Displaying |
| 27 | ;; that allows conversion between viewing the text of the file, | 27 | ;; images only works if Emacs was built with support for displaying |
| 28 | ;; hex of the file and viewing the file as an image. Viewing the image | 28 | ;; such images. See Info node `(emacs) Image Mode' for more |
| 29 | ;; works by putting a `display' text-property on the | 29 | ;; information. |
| 30 | ;; | ||
| 31 | ;; There is support for switching between viewing the text of the | ||
| 32 | ;; file, the hex of the file and viewing the file as an image. | ||
| 33 | ;; Viewing the image works by putting a `display' text-property on the | ||
| 30 | ;; image data, with the image-data still present underneath; if the | 34 | ;; image data, with the image-data still present underneath; if the |
| 31 | ;; resulting buffer file is saved to another name it will correctly save | 35 | ;; resulting buffer file is saved to another name it will correctly save |
| 32 | ;; the image data to the new file. | 36 | ;; the image data to the new file. |
| @@ -789,13 +793,9 @@ See commands `image-mode' and `image-minor-mode' for more information | |||
| 789 | on these modes." | 793 | on these modes." |
| 790 | (interactive) | 794 | (interactive) |
| 791 | (image-mode-to-text) | 795 | (image-mode-to-text) |
| 792 | ;; Turn on hexl-mode | ||
| 793 | (hexl-mode) | 796 | (hexl-mode) |
| 794 | (message (substitute-command-keys | 797 | (message "%s" (substitute-command-keys |
| 795 | "Type \\[image-toggle-hex-display] or \ | 798 | "Type \\[hexl-mode-exit] to view the image as an image"))) |
| 796 | \\[image-toggle-display] to view the image as %s") | ||
| 797 | (if (image-get-display-property) | ||
| 798 | "hex" "an image or text"))) | ||
| 799 | 799 | ||
| 800 | (defun image-mode-as-text () | 800 | (defun image-mode-as-text () |
| 801 | "Set a non-image mode as major mode in combination with image minor mode. | 801 | "Set a non-image mode as major mode in combination with image minor mode. |