diff options
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 26 | ||||
| -rw-r--r-- | lisp/thumbs.el | 18 |
3 files changed, 17 insertions, 41 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f5fd1efb23..cf15e2a21c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,15 @@ | |||
| 1 | 2013-07-11 Glenn Morris <rgm@gnu.org> | 1 | 2013-07-11 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * emacs-lisp/edebug.el: Require cl-lib at run-time too. | ||
| 4 | (edebug-gensym-index, edebug-gensym): | ||
| 5 | Remove reimplementation of cl-gensym. | ||
| 6 | (edebug-make-enter-wrapper, edebug-make-form-wrapper): Use cl-gensym. | ||
| 7 | |||
| 8 | * thumbs.el: Require cl-lib at run-time too. | ||
| 9 | (thumbs-gensym-counter, thumbs-gensym): | ||
| 10 | Remove reimplementation of cl-gensym. | ||
| 11 | (thumbs-temp-file): Use cl-gensym. | ||
| 12 | |||
| 3 | * emacs-lisp/ert.el: Require cl-lib at runtime too. | 13 | * emacs-lisp/ert.el: Require cl-lib at runtime too. |
| 4 | (ert--cl-do-remf, ert--remprop, ert--remove-if-not) | 14 | (ert--cl-do-remf, ert--remprop, ert--remove-if-not) |
| 5 | (ert--intersection, ert--set-difference, ert--set-difference-eq) | 15 | (ert--intersection, ert--set-difference, ert--set-difference-eq) |
| @@ -691,7 +701,7 @@ | |||
| 691 | * emacs-lock.el (emacs-lock-mode, emacs-lock--old-mode) | 701 | * emacs-lock.el (emacs-lock-mode, emacs-lock--old-mode) |
| 692 | (emacs-lock--try-unlocking): Make defvar-local. | 702 | (emacs-lock--try-unlocking): Make defvar-local. |
| 693 | 703 | ||
| 694 | 2013-06-22 Glenn Morris <rgm@fencepost.gnu.org> | 704 | 2013-06-22 Glenn Morris <rgm@gnu.org> |
| 695 | 705 | ||
| 696 | * play/cookie1.el (cookie-apropos): Minor simplification. | 706 | * play/cookie1.el (cookie-apropos): Minor simplification. |
| 697 | 707 | ||
| @@ -1157,7 +1167,7 @@ | |||
| 1157 | 1167 | ||
| 1158 | * net/shr.el (shr-map): Bind [down-mouse-1] to browse URLs. | 1168 | * net/shr.el (shr-map): Bind [down-mouse-1] to browse URLs. |
| 1159 | 1169 | ||
| 1160 | 2013-06-19 Glenn Morris <rgm@fencepost.gnu.org> | 1170 | 2013-06-19 Glenn Morris <rgm@gnu.org> |
| 1161 | 1171 | ||
| 1162 | * emacs-lisp/eieio.el (defclass): Make it eval-and-compile once more. | 1172 | * emacs-lisp/eieio.el (defclass): Make it eval-and-compile once more. |
| 1163 | 1173 | ||
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 319af588eac..36c72f3a3bd 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | ;;; Code: | 53 | ;;; Code: |
| 54 | 54 | ||
| 55 | (require 'macroexp) | 55 | (require 'macroexp) |
| 56 | (eval-when-compile (require 'cl-lib)) | 56 | (require 'cl-lib) |
| 57 | (eval-when-compile (require 'pcase)) | 57 | (eval-when-compile (require 'pcase)) |
| 58 | 58 | ||
| 59 | ;;; Options | 59 | ;;; Options |
| @@ -263,26 +263,6 @@ An extant spec symbol is a symbol that is not a function and has a | |||
| 263 | 263 | ||
| 264 | ;;; Utilities | 264 | ;;; Utilities |
| 265 | 265 | ||
| 266 | ;; Define edebug-gensym - from old cl.el | ||
| 267 | (defvar edebug-gensym-index 0 | ||
| 268 | "Integer used by `edebug-gensym' to produce new names.") | ||
| 269 | |||
| 270 | (defun edebug-gensym (&optional prefix) | ||
| 271 | "Generate a fresh uninterned symbol. | ||
| 272 | There is an optional argument, PREFIX. PREFIX is the string | ||
| 273 | that begins the new name. Most people take just the default, | ||
| 274 | except when debugging needs suggest otherwise." | ||
| 275 | (if (null prefix) | ||
| 276 | (setq prefix "G")) | ||
| 277 | (let ((newsymbol nil) | ||
| 278 | (newname "")) | ||
| 279 | (while (not newsymbol) | ||
| 280 | (setq newname (concat prefix (int-to-string edebug-gensym-index))) | ||
| 281 | (setq edebug-gensym-index (+ edebug-gensym-index 1)) | ||
| 282 | (if (not (intern-soft newname)) | ||
| 283 | (setq newsymbol (make-symbol newname)))) | ||
| 284 | newsymbol)) | ||
| 285 | |||
| 286 | (defun edebug-lambda-list-keywordp (object) | 266 | (defun edebug-lambda-list-keywordp (object) |
| 287 | "Return t if OBJECT is a lambda list keyword. | 267 | "Return t if OBJECT is a lambda list keyword. |
| 288 | A lambda list keyword is a symbol that starts with `&'." | 268 | A lambda list keyword is a symbol that starts with `&'." |
| @@ -1186,7 +1166,7 @@ Maybe clear the markers and delete the symbol's edebug property?" | |||
| 1186 | ;; Uses the dynamically bound vars edebug-def-name and edebug-def-args. | 1166 | ;; Uses the dynamically bound vars edebug-def-name and edebug-def-args. |
| 1187 | ;; Do this after parsing since that may find a name. | 1167 | ;; Do this after parsing since that may find a name. |
| 1188 | (setq edebug-def-name | 1168 | (setq edebug-def-name |
| 1189 | (or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon"))) | 1169 | (or edebug-def-name edebug-old-def-name (cl-gensym "edebug-anon"))) |
| 1190 | `(edebug-enter | 1170 | `(edebug-enter |
| 1191 | (quote ,edebug-def-name) | 1171 | (quote ,edebug-def-name) |
| 1192 | ,(if edebug-inside-func | 1172 | ,(if edebug-inside-func |
| @@ -1299,7 +1279,7 @@ expressions; a `progn' form will be returned enclosing these forms." | |||
| 1299 | 1279 | ||
| 1300 | ;; Set the name here if it was not set by edebug-make-enter-wrapper. | 1280 | ;; Set the name here if it was not set by edebug-make-enter-wrapper. |
| 1301 | (setq edebug-def-name | 1281 | (setq edebug-def-name |
| 1302 | (or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon"))) | 1282 | (or edebug-def-name edebug-old-def-name (cl-gensym "edebug-anon"))) |
| 1303 | 1283 | ||
| 1304 | ;; Add this def as a dependent of containing def. Buggy. | 1284 | ;; Add this def as a dependent of containing def. Buggy. |
| 1305 | '(if (and edebug-containing-def-name | 1285 | '(if (and edebug-containing-def-name |
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'). |