X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d76bf86f438d4f5f9fe493ab76f02ffc78f3ae2e..1ba6f2c7bbacfda2bb014d30cfb3999146943de8:/lisp/thumbs.el diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 3d59130341..dd50c2ddfb 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -1,9 +1,9 @@ ;;; thumbs.el --- Thumbnails previewer for images files -;; Copyright (C) 2004-2013 Free Software Foundation, Inc. +;; Copyright (C) 2004-2016 Free Software Foundation, Inc. ;; Author: Jean-Philippe Theberge -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: Multimedia ;; This file is part of GNU Emacs. @@ -57,6 +57,7 @@ ;;; Code: (require 'dired) +(require 'cl-lib) ; for cl-gensym ;; CUSTOMIZATIONS @@ -101,7 +102,7 @@ When it reaches that size (in bytes), a warning is sent." (or (executable-find "convert") "/usr/X11R6/bin/convert")) "Name of conversion program for thumbnails generation. -It must be 'convert'." +It must be \"convert\"." :type 'string :group 'thumbs) @@ -179,21 +180,6 @@ this value can let another user see some of your images." (make-variable-buffer-local 'thumbs-marked-list) (put 'thumbs-marked-list 'permanent-local t) -(defalias 'thumbs-gensym - (if (fboundp 'gensym) - 'gensym - ;; Copied from cl-macs.el - (defvar thumbs-gensym-counter 0) - (lambda (&optional prefix) - "Generate a new uninterned symbol. -The name is made by appending a number to PREFIX, default \"G\"." - (let ((pfix (if (stringp prefix) prefix "G")) - (num (if (integerp prefix) prefix - (prog1 thumbs-gensym-counter - (setq thumbs-gensym-counter - (1+ thumbs-gensym-counter)))))) - (make-symbol (format "%s%d" pfix num)))))) - (defsubst thumbs-temp-dir () (file-name-as-directory (expand-file-name thumbs-temp-dir))) @@ -202,7 +188,7 @@ The name is made by appending a number to PREFIX, default \"G\"." (format "%s%s-%s.jpg" (thumbs-temp-dir) thumbs-temp-prefix - (thumbs-gensym "T"))) + (cl-gensym "T"))) (defun thumbs-thumbsdir () "Return the current thumbnails directory (from `thumbs-thumbsdir'). @@ -249,7 +235,7 @@ Optional arguments are: ARG any arguments to the ACTION command, OUTPUT-FORMAT is the file format to output (default is jpeg), ACTION-PREFIX is the symbol to place before the ACTION command - (defaults to '-' but can sometimes be '+')." + (defaults to `-' but can sometimes be `+')." (call-process thumbs-conversion-program nil nil nil (or action-prefix "-") action