* 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.
2013-07-11 Glenn Morris <rgm@gnu.org>
+ * 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.
+
+ * 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.
+
* emacs-lisp/ert.el: Require cl-lib at runtime too.
(ert--cl-do-remf, ert--remprop, ert--remove-if-not)
(ert--intersection, ert--set-difference, ert--set-difference-eq)
* emacs-lock.el (emacs-lock-mode, emacs-lock--old-mode)
(emacs-lock--try-unlocking): Make defvar-local.
-2013-06-22 Glenn Morris <rgm@fencepost.gnu.org>
+2013-06-22 Glenn Morris <rgm@gnu.org>
* play/cookie1.el (cookie-apropos): Minor simplification.
* net/shr.el (shr-map): Bind [down-mouse-1] to browse URLs.
-2013-06-19 Glenn Morris <rgm@fencepost.gnu.org>
+2013-06-19 Glenn Morris <rgm@gnu.org>
* emacs-lisp/eieio.el (defclass): Make it eval-and-compile once more.
;;; Code:
(require 'macroexp)
-(eval-when-compile (require 'cl-lib))
+(require 'cl-lib)
(eval-when-compile (require 'pcase))
;;; Options
;;; Utilities
-;; Define edebug-gensym - from old cl.el
-(defvar edebug-gensym-index 0
- "Integer used by `edebug-gensym' to produce new names.")
-
-(defun edebug-gensym (&optional prefix)
- "Generate a fresh uninterned symbol.
-There is an optional argument, PREFIX. PREFIX is the string
-that begins the new name. Most people take just the default,
-except when debugging needs suggest otherwise."
- (if (null prefix)
- (setq prefix "G"))
- (let ((newsymbol nil)
- (newname ""))
- (while (not newsymbol)
- (setq newname (concat prefix (int-to-string edebug-gensym-index)))
- (setq edebug-gensym-index (+ edebug-gensym-index 1))
- (if (not (intern-soft newname))
- (setq newsymbol (make-symbol newname))))
- newsymbol))
-
(defun edebug-lambda-list-keywordp (object)
"Return t if OBJECT is a lambda list keyword.
A lambda list keyword is a symbol that starts with `&'."
;; Uses the dynamically bound vars edebug-def-name and edebug-def-args.
;; Do this after parsing since that may find a name.
(setq edebug-def-name
- (or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon")))
+ (or edebug-def-name edebug-old-def-name (cl-gensym "edebug-anon")))
`(edebug-enter
(quote ,edebug-def-name)
,(if edebug-inside-func
;; Set the name here if it was not set by edebug-make-enter-wrapper.
(setq edebug-def-name
- (or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon")))
+ (or edebug-def-name edebug-old-def-name (cl-gensym "edebug-anon")))
;; Add this def as a dependent of containing def. Buggy.
'(if (and edebug-containing-def-name
;;; Code:
(require 'dired)
+(require 'cl-lib) ; for cl-gensym
;; CUSTOMIZATIONS
(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)))
(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').