diff options
| author | Glenn Morris | 2013-07-11 13:16:19 -0400 |
|---|---|---|
| committer | Glenn Morris | 2013-07-11 13:16:19 -0400 |
| commit | 4582a01c70d76b2b2eb023600d4e5cf5bb011f8a (patch) | |
| tree | 3f83896f7960a33f9183dcc02eb7880e7e1787cb /lisp/thumbs.el | |
| parent | a3d4dd872c27c66ec2e5d4fd49ac6df1144593a2 (diff) | |
| download | emacs-4582a01c70d76b2b2eb023600d4e5cf5bb011f8a.tar.gz emacs-4582a01c70d76b2b2eb023600d4e5cf5bb011f8a.zip | |
Remove some reimplementations of cl-gensym
* lisp/thumbs.el: Require cl-lib at run-time too.
(thumbs-gensym-counter, thumbs-gensym):
Remove reimplementation of cl-gensym.
(thumbs-temp-file): Use cl-gensym.
* lisp/emacs-lisp/edebug.el: Require cl-lib at run-time too.
(edebug-gensym-index, edebug-gensym):
Remove reimplementation of cl-gensym.
(edebug-make-enter-wrapper, edebug-make-form-wrapper): Use cl-gensym.
Diffstat (limited to 'lisp/thumbs.el')
| -rw-r--r-- | lisp/thumbs.el | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 3d591303414..8032de85b01 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el | |||
| @@ -57,6 +57,7 @@ | |||
| 57 | ;;; Code: | 57 | ;;; Code: |
| 58 | 58 | ||
| 59 | (require 'dired) | 59 | (require 'dired) |
| 60 | (require 'cl-lib) ; for cl-gensym | ||
| 60 | 61 | ||
| 61 | ;; CUSTOMIZATIONS | 62 | ;; CUSTOMIZATIONS |
| 62 | 63 | ||
| @@ -179,21 +180,6 @@ this value can let another user see some of your images." | |||
| 179 | (make-variable-buffer-local 'thumbs-marked-list) | 180 | (make-variable-buffer-local 'thumbs-marked-list) |
| 180 | (put 'thumbs-marked-list 'permanent-local t) | 181 | (put 'thumbs-marked-list 'permanent-local t) |
| 181 | 182 | ||
| 182 | (defalias 'thumbs-gensym | ||
| 183 | (if (fboundp 'gensym) | ||
| 184 | 'gensym | ||
| 185 | ;; Copied from cl-macs.el | ||
| 186 | (defvar thumbs-gensym-counter 0) | ||
| 187 | (lambda (&optional prefix) | ||
| 188 | "Generate a new uninterned symbol. | ||
| 189 | The name is made by appending a number to PREFIX, default \"G\"." | ||
| 190 | (let ((pfix (if (stringp prefix) prefix "G")) | ||
| 191 | (num (if (integerp prefix) prefix | ||
| 192 | (prog1 thumbs-gensym-counter | ||
| 193 | (setq thumbs-gensym-counter | ||
| 194 | (1+ thumbs-gensym-counter)))))) | ||
| 195 | (make-symbol (format "%s%d" pfix num)))))) | ||
| 196 | |||
| 197 | (defsubst thumbs-temp-dir () | 183 | (defsubst thumbs-temp-dir () |
| 198 | (file-name-as-directory (expand-file-name thumbs-temp-dir))) | 184 | (file-name-as-directory (expand-file-name thumbs-temp-dir))) |
| 199 | 185 | ||
| @@ -202,7 +188,7 @@ The name is made by appending a number to PREFIX, default \"G\"." | |||
| 202 | (format "%s%s-%s.jpg" | 188 | (format "%s%s-%s.jpg" |
| 203 | (thumbs-temp-dir) | 189 | (thumbs-temp-dir) |
| 204 | thumbs-temp-prefix | 190 | thumbs-temp-prefix |
| 205 | (thumbs-gensym "T"))) | 191 | (cl-gensym "T"))) |
| 206 | 192 | ||
| 207 | (defun thumbs-thumbsdir () | 193 | (defun thumbs-thumbsdir () |
| 208 | "Return the current thumbnails directory (from `thumbs-thumbsdir'). | 194 | "Return the current thumbnails directory (from `thumbs-thumbsdir'). |