diff options
| author | Mark Oteiza | 2016-12-13 11:47:21 -0500 |
|---|---|---|
| committer | Mark Oteiza | 2016-12-13 11:47:21 -0500 |
| commit | aacb20c0b73dc34e53c268e39131332d779cfe35 (patch) | |
| tree | da33884f3d50c2780c20726a321c8608f2a3107d | |
| parent | 86762eb174653ead8fa8c5d1cd5b263e9e0a2ac6 (diff) | |
| download | emacs-aacb20c0b73dc34e53c268e39131332d779cfe35.tar.gz emacs-aacb20c0b73dc34e53c268e39131332d779cfe35.zip | |
More small fixes for image-dired
* lisp/image-dired.el: Fix commentary to refer to correct Emacs manual
node.
(image-dired--with-db-file): Add declare forms.
(image-dired-hidden-p): Rewrite with cl-loop. It's not necessary to
run through the whole list.
| -rw-r--r-- | lisp/image-dired.el | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 30705f841e7..c5fcadc5b00 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | ;; | 79 | ;; |
| 80 | ;; This information has been moved to the manual. Type `C-h r' to open | 80 | ;; This information has been moved to the manual. Type `C-h r' to open |
| 81 | ;; the Emacs manual and go to the node Thumbnails by typing `g | 81 | ;; the Emacs manual and go to the node Thumbnails by typing `g |
| 82 | ;; Thumbnails RET'. | 82 | ;; Image-Dired RET'. |
| 83 | ;; | 83 | ;; |
| 84 | ;; Quickstart: M-x image-dired RET DIRNAME RET | 84 | ;; Quickstart: M-x image-dired RET DIRNAME RET |
| 85 | ;; | 85 | ;; |
| @@ -516,6 +516,7 @@ before warning the user." | |||
| 516 | (defmacro image-dired--with-db-file (&rest body) | 516 | (defmacro image-dired--with-db-file (&rest body) |
| 517 | "Run BODY in a temp buffer containing `image-dired-db-file'. | 517 | "Run BODY in a temp buffer containing `image-dired-db-file'. |
| 518 | Return the last form in BODY." | 518 | Return the last form in BODY." |
| 519 | (declare (indent 0) (debug t)) | ||
| 519 | `(with-temp-buffer | 520 | `(with-temp-buffer |
| 520 | (if (file-exists-p image-dired-db-file) | 521 | (if (file-exists-p image-dired-db-file) |
| 521 | (insert-file-contents image-dired-db-file)) | 522 | (insert-file-contents image-dired-db-file)) |
| @@ -2238,13 +2239,8 @@ image-dired-file-comment-list: | |||
| 2238 | 2239 | ||
| 2239 | (defun image-dired-hidden-p (file) | 2240 | (defun image-dired-hidden-p (file) |
| 2240 | "Return t if image FILE has a \"hidden\" tag." | 2241 | "Return t if image FILE has a \"hidden\" tag." |
| 2241 | (let (hidden) | 2242 | (cl-loop for tag in (cdr (assoc file image-dired-file-tag-list)) |
| 2242 | (mapc | 2243 | if (member tag image-dired-gallery-hidden-tags) return t)) |
| 2243 | (lambda (tag) | ||
| 2244 | (if (member tag image-dired-gallery-hidden-tags) | ||
| 2245 | (setq hidden t))) | ||
| 2246 | (cdr (assoc file image-dired-file-tag-list))) | ||
| 2247 | hidden)) | ||
| 2248 | 2244 | ||
| 2249 | (defun image-dired-gallery-generate () | 2245 | (defun image-dired-gallery-generate () |
| 2250 | "Generate gallery pages. | 2246 | "Generate gallery pages. |