diff options
| author | Stefan Monnier | 2012-05-17 16:04:56 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-05-17 16:04:56 -0400 |
| commit | 4735906a0363f9a5a77f939afe9bfec07765845e (patch) | |
| tree | 7dd5a837e9b1c9e8e15f88ad7bfba41aefad20a1 /lisp | |
| parent | 904769baa934f6d2febd59195633ce6bc12710ff (diff) | |
| download | emacs-4735906a0363f9a5a77f939afe9bfec07765845e.tar.gz emacs-4735906a0363f9a5a77f939afe9bfec07765845e.zip | |
Minor renaming of internal CL functions and variables.
* lisp/emacs-lisp/cl-seq.el (cl--adjoin): Rename from cl-adjoin.
(cl--position): Rename from cl-position.
(cl--delete-duplicates): Rename from cl-delete-duplicates.
* lisp/emacs-lisp/cl.el (cl--gensym-counter): Rename from *gensym-counter*.
(cl--random-state): Rename from *random-state*.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-loaddefs.el | 12 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 10 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-seq.el | 40 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl.el | 6 |
6 files changed, 46 insertions, 37 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fca6543072c..3981911d99b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,14 @@ | |||
| 1 | 2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | Minor renaming of internal CL functions and variables. | ||
| 4 | * emacs-lisp/cl-seq.el (cl--adjoin): Rename from cl-adjoin. | ||
| 5 | (cl--position): Rename from cl-position. | ||
| 6 | (cl--delete-duplicates): Rename from cl-delete-duplicates. | ||
| 7 | * emacs-lisp/cl.el (cl--gensym-counter): Rename from *gensym-counter*. | ||
| 8 | (cl--random-state): Rename from *random-state*. | ||
| 9 | |||
| 10 | 2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 11 | |||
| 3 | * emacs-lisp/cl-macs.el (cl-transform-lambda): Don't add spurious | 12 | * emacs-lisp/cl-macs.el (cl-transform-lambda): Don't add spurious |
| 4 | parens around the arg list (bug#11499). | 13 | parens around the arg list (bug#11499). |
| 5 | 14 | ||
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 9a3d8cf705b..420480d16ea 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el | |||
| @@ -434,7 +434,7 @@ With two arguments, return rounding and remainder of their quotient." | |||
| 434 | (defun random* (lim &optional state) | 434 | (defun random* (lim &optional state) |
| 435 | "Return a random nonnegative number less than LIM, an integer or float. | 435 | "Return a random nonnegative number less than LIM, an integer or float. |
| 436 | Optional second arg STATE is a random-state object." | 436 | Optional second arg STATE is a random-state object." |
| 437 | (or state (setq state *random-state*)) | 437 | (or state (setq state cl--random-state)) |
| 438 | ;; Inspired by "ran3" from Numerical Recipes. Additive congruential method. | 438 | ;; Inspired by "ran3" from Numerical Recipes. Additive congruential method. |
| 439 | (let ((vec (aref state 3))) | 439 | (let ((vec (aref state 3))) |
| 440 | (if (integerp vec) | 440 | (if (integerp vec) |
| @@ -457,9 +457,9 @@ Optional second arg STATE is a random-state object." | |||
| 457 | 457 | ||
| 458 | ;;;###autoload | 458 | ;;;###autoload |
| 459 | (defun make-random-state (&optional state) | 459 | (defun make-random-state (&optional state) |
| 460 | "Return a copy of random-state STATE, or of `*random-state*' if omitted. | 460 | "Return a copy of random-state STATE, or of the internal state if omitted. |
| 461 | If STATE is t, return a new state object seeded from the time of day." | 461 | If STATE is t, return a new state object seeded from the time of day." |
| 462 | (cond ((null state) (make-random-state *random-state*)) | 462 | (cond ((null state) (make-random-state cl--random-state)) |
| 463 | ((vectorp state) (cl-copy-tree state t)) | 463 | ((vectorp state) (cl-copy-tree state t)) |
| 464 | ((integerp state) (vector 'cl-random-state-tag -1 30 state)) | 464 | ((integerp state) (vector 'cl-random-state-tag -1 30 state)) |
| 465 | (t (make-random-state (cl-random-time))))) | 465 | (t (make-random-state (cl-random-time))))) |
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 06c8fe8dba7..a00b4550b31 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p | 10 | ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p |
| 11 | ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively | 11 | ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively |
| 12 | ;;;;;; notevery notany every some mapcon mapcan mapl maplist map | 12 | ;;;;;; notevery notany every some mapcon mapcan mapl maplist map |
| 13 | ;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "5a8a7f7ec2dc453113b8cbda577f2acb") | 13 | ;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "1a3a04c6a0286373093bea4b9bcf2e91") |
| 14 | ;;; Generated autoloads from cl-extra.el | 14 | ;;; Generated autoloads from cl-extra.el |
| 15 | 15 | ||
| 16 | (autoload 'coerce "cl-extra" "\ | 16 | (autoload 'coerce "cl-extra" "\ |
| @@ -169,7 +169,7 @@ Optional second arg STATE is a random-state object. | |||
| 169 | \(fn LIM &optional STATE)" nil nil) | 169 | \(fn LIM &optional STATE)" nil nil) |
| 170 | 170 | ||
| 171 | (autoload 'make-random-state "cl-extra" "\ | 171 | (autoload 'make-random-state "cl-extra" "\ |
| 172 | Return a copy of random-state STATE, or of `*random-state*' if omitted. | 172 | Return a copy of random-state STATE, or of the internal state if omitted. |
| 173 | If STATE is t, return a new state object seeded from the time of day. | 173 | If STATE is t, return a new state object seeded from the time of day. |
| 174 | 174 | ||
| 175 | \(fn &optional STATE)" nil nil) | 175 | \(fn &optional STATE)" nil nil) |
| @@ -286,7 +286,7 @@ This also does some trivial optimizations to make the form prettier. | |||
| 286 | ;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist | 286 | ;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist |
| 287 | ;;;;;; do* do loop return-from return block etypecase typecase ecase | 287 | ;;;;;; do* do loop return-from return block etypecase typecase ecase |
| 288 | ;;;;;; case load-time-value eval-when destructuring-bind function* | 288 | ;;;;;; case load-time-value eval-when destructuring-bind function* |
| 289 | ;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "e10ebd95224fcfbe6a5edc59f40d695a") | 289 | ;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "69ccd3344cea28acc44dd28eca07292f") |
| 290 | ;;; Generated autoloads from cl-macs.el | 290 | ;;; Generated autoloads from cl-macs.el |
| 291 | 291 | ||
| 292 | (autoload 'gensym "cl-macs" "\ | 292 | (autoload 'gensym "cl-macs" "\ |
| @@ -764,13 +764,13 @@ surrounded by (block NAME ...). | |||
| 764 | ;;;;;; nsubst subst-if-not subst-if subsetp nset-exclusive-or set-exclusive-or | 764 | ;;;;;; nsubst subst-if-not subst-if subsetp nset-exclusive-or set-exclusive-or |
| 765 | ;;;;;; nset-difference set-difference nintersection intersection | 765 | ;;;;;; nset-difference set-difference nintersection intersection |
| 766 | ;;;;;; nunion union rassoc-if-not rassoc-if rassoc* assoc-if-not | 766 | ;;;;;; nunion union rassoc-if-not rassoc-if rassoc* assoc-if-not |
| 767 | ;;;;;; assoc-if assoc* cl-adjoin member-if-not member-if member* | 767 | ;;;;;; assoc-if assoc* cl--adjoin member-if-not member-if member* |
| 768 | ;;;;;; merge stable-sort sort* search mismatch count-if-not count-if | 768 | ;;;;;; merge stable-sort sort* search mismatch count-if-not count-if |
| 769 | ;;;;;; count position-if-not position-if position find-if-not find-if | 769 | ;;;;;; count position-if-not position-if position find-if-not find-if |
| 770 | ;;;;;; find nsubstitute-if-not nsubstitute-if nsubstitute substitute-if-not | 770 | ;;;;;; find nsubstitute-if-not nsubstitute-if nsubstitute substitute-if-not |
| 771 | ;;;;;; substitute-if substitute delete-duplicates remove-duplicates | 771 | ;;;;;; substitute-if substitute delete-duplicates remove-duplicates |
| 772 | ;;;;;; delete-if-not delete-if delete* remove-if-not remove-if remove* | 772 | ;;;;;; delete-if-not delete-if delete* remove-if-not remove-if remove* |
| 773 | ;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "99095e49c83af1c8bec0fdcf517b3f95") | 773 | ;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "2d8563fcbdf4bc77e569d0aeb0a35cfc") |
| 774 | ;;; Generated autoloads from cl-seq.el | 774 | ;;; Generated autoloads from cl-seq.el |
| 775 | 775 | ||
| 776 | (autoload 'reduce "cl-seq" "\ | 776 | (autoload 'reduce "cl-seq" "\ |
| @@ -1047,7 +1047,7 @@ Keywords supported: :key | |||
| 1047 | 1047 | ||
| 1048 | \(fn PREDICATE LIST [KEYWORD VALUE]...)" nil nil) | 1048 | \(fn PREDICATE LIST [KEYWORD VALUE]...)" nil nil) |
| 1049 | 1049 | ||
| 1050 | (autoload 'cl-adjoin "cl-seq" "\ | 1050 | (autoload 'cl--adjoin "cl-seq" "\ |
| 1051 | 1051 | ||
| 1052 | 1052 | ||
| 1053 | \(fn CL-ITEM CL-LIST &rest CL-KEYS)" nil nil) | 1053 | \(fn CL-ITEM CL-LIST &rest CL-KEYS)" nil nil) |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 66fafb9ba41..6ca5e6294d6 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -167,15 +167,15 @@ | |||
| 167 | 167 | ||
| 168 | ;;; Symbols. | 168 | ;;; Symbols. |
| 169 | 169 | ||
| 170 | (defvar *gensym-counter*) | 170 | (defvar cl--gensym-counter) |
| 171 | ;;;###autoload | 171 | ;;;###autoload |
| 172 | (defun gensym (&optional prefix) | 172 | (defun gensym (&optional prefix) |
| 173 | "Generate a new uninterned symbol. | 173 | "Generate a new uninterned symbol. |
| 174 | The name is made by appending a number to PREFIX, default \"G\"." | 174 | The name is made by appending a number to PREFIX, default \"G\"." |
| 175 | (let ((pfix (if (stringp prefix) prefix "G")) | 175 | (let ((pfix (if (stringp prefix) prefix "G")) |
| 176 | (num (if (integerp prefix) prefix | 176 | (num (if (integerp prefix) prefix |
| 177 | (prog1 *gensym-counter* | 177 | (prog1 cl--gensym-counter |
| 178 | (setq *gensym-counter* (1+ *gensym-counter*)))))) | 178 | (setq cl--gensym-counter (1+ cl--gensym-counter)))))) |
| 179 | (make-symbol (format "%s%d" pfix num)))) | 179 | (make-symbol (format "%s%d" pfix num)))) |
| 180 | 180 | ||
| 181 | ;;;###autoload | 181 | ;;;###autoload |
| @@ -184,8 +184,8 @@ The name is made by appending a number to PREFIX, default \"G\"." | |||
| 184 | The name is made by appending a number to PREFIX, default \"G\"." | 184 | The name is made by appending a number to PREFIX, default \"G\"." |
| 185 | (let ((pfix (if (stringp prefix) prefix "G")) | 185 | (let ((pfix (if (stringp prefix) prefix "G")) |
| 186 | name) | 186 | name) |
| 187 | (while (intern-soft (setq name (format "%s%d" pfix *gensym-counter*))) | 187 | (while (intern-soft (setq name (format "%s%d" pfix cl--gensym-counter))) |
| 188 | (setq *gensym-counter* (1+ *gensym-counter*))) | 188 | (setq cl--gensym-counter (1+ cl--gensym-counter))) |
| 189 | (intern name))) | 189 | (intern name))) |
| 190 | 190 | ||
| 191 | 191 | ||
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index f1890fbccf6..233f0c83a6e 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el | |||
| @@ -213,8 +213,8 @@ to avoid corrupting the original SEQ. | |||
| 213 | (if (<= (or cl-count (setq cl-count 8000000)) 0) | 213 | (if (<= (or cl-count (setq cl-count 8000000)) 0) |
| 214 | cl-seq | 214 | cl-seq |
| 215 | (if (or (nlistp cl-seq) (and cl-from-end (< cl-count 4000000))) | 215 | (if (or (nlistp cl-seq) (and cl-from-end (< cl-count 4000000))) |
| 216 | (let ((cl-i (cl-position cl-item cl-seq cl-start cl-end | 216 | (let ((cl-i (cl--position cl-item cl-seq cl-start cl-end |
| 217 | cl-from-end))) | 217 | cl-from-end))) |
| 218 | (if cl-i | 218 | (if cl-i |
| 219 | (let ((cl-res (apply 'delete* cl-item (append cl-seq nil) | 219 | (let ((cl-res (apply 'delete* cl-item (append cl-seq nil) |
| 220 | (append (if cl-from-end | 220 | (append (if cl-from-end |
| @@ -279,8 +279,8 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. | |||
| 279 | (if (and cl-from-end (< cl-count 4000000)) | 279 | (if (and cl-from-end (< cl-count 4000000)) |
| 280 | (let (cl-i) | 280 | (let (cl-i) |
| 281 | (while (and (>= (setq cl-count (1- cl-count)) 0) | 281 | (while (and (>= (setq cl-count (1- cl-count)) 0) |
| 282 | (setq cl-i (cl-position cl-item cl-seq cl-start | 282 | (setq cl-i (cl--position cl-item cl-seq cl-start |
| 283 | cl-end cl-from-end))) | 283 | cl-end cl-from-end))) |
| 284 | (if (= cl-i 0) (setq cl-seq (cdr cl-seq)) | 284 | (if (= cl-i 0) (setq cl-seq (cdr cl-seq)) |
| 285 | (let ((cl-tail (nthcdr (1- cl-i) cl-seq))) | 285 | (let ((cl-tail (nthcdr (1- cl-i) cl-seq))) |
| 286 | (setcdr cl-tail (cdr (cdr cl-tail))))) | 286 | (setcdr cl-tail (cdr (cdr cl-tail))))) |
| @@ -330,16 +330,16 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. | |||
| 330 | "Return a copy of SEQ with all duplicate elements removed. | 330 | "Return a copy of SEQ with all duplicate elements removed. |
| 331 | \nKeywords supported: :test :test-not :key :start :end :from-end | 331 | \nKeywords supported: :test :test-not :key :start :end :from-end |
| 332 | \n(fn SEQ [KEYWORD VALUE]...)" | 332 | \n(fn SEQ [KEYWORD VALUE]...)" |
| 333 | (cl-delete-duplicates cl-seq cl-keys t)) | 333 | (cl--delete-duplicates cl-seq cl-keys t)) |
| 334 | 334 | ||
| 335 | ;;;###autoload | 335 | ;;;###autoload |
| 336 | (defun delete-duplicates (cl-seq &rest cl-keys) | 336 | (defun delete-duplicates (cl-seq &rest cl-keys) |
| 337 | "Remove all duplicate elements from SEQ (destructively). | 337 | "Remove all duplicate elements from SEQ (destructively). |
| 338 | \nKeywords supported: :test :test-not :key :start :end :from-end | 338 | \nKeywords supported: :test :test-not :key :start :end :from-end |
| 339 | \n(fn SEQ [KEYWORD VALUE]...)" | 339 | \n(fn SEQ [KEYWORD VALUE]...)" |
| 340 | (cl-delete-duplicates cl-seq cl-keys nil)) | 340 | (cl--delete-duplicates cl-seq cl-keys nil)) |
| 341 | 341 | ||
| 342 | (defun cl-delete-duplicates (cl-seq cl-keys cl-copy) | 342 | (defun cl--delete-duplicates (cl-seq cl-keys cl-copy) |
| 343 | (if (listp cl-seq) | 343 | (if (listp cl-seq) |
| 344 | (cl-parsing-keywords (:test :test-not :key (:start 0) :end :from-end :if) | 344 | (cl-parsing-keywords (:test :test-not :key (:start 0) :end :from-end :if) |
| 345 | () | 345 | () |
| @@ -348,8 +348,8 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. | |||
| 348 | (setq cl-end (- (or cl-end (length cl-seq)) cl-start)) | 348 | (setq cl-end (- (or cl-end (length cl-seq)) cl-start)) |
| 349 | (while (> cl-end 1) | 349 | (while (> cl-end 1) |
| 350 | (setq cl-i 0) | 350 | (setq cl-i 0) |
| 351 | (while (setq cl-i (cl-position (cl-check-key (car cl-p)) | 351 | (while (setq cl-i (cl--position (cl-check-key (car cl-p)) |
| 352 | (cdr cl-p) cl-i (1- cl-end))) | 352 | (cdr cl-p) cl-i (1- cl-end))) |
| 353 | (if cl-copy (setq cl-seq (copy-sequence cl-seq) | 353 | (if cl-copy (setq cl-seq (copy-sequence cl-seq) |
| 354 | cl-p (nthcdr cl-start cl-seq) cl-copy nil)) | 354 | cl-p (nthcdr cl-start cl-seq) cl-copy nil)) |
| 355 | (let ((cl-tail (nthcdr cl-i cl-p))) | 355 | (let ((cl-tail (nthcdr cl-i cl-p))) |
| @@ -360,14 +360,14 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. | |||
| 360 | cl-seq) | 360 | cl-seq) |
| 361 | (setq cl-end (- (or cl-end (length cl-seq)) cl-start)) | 361 | (setq cl-end (- (or cl-end (length cl-seq)) cl-start)) |
| 362 | (while (and (cdr cl-seq) (= cl-start 0) (> cl-end 1) | 362 | (while (and (cdr cl-seq) (= cl-start 0) (> cl-end 1) |
| 363 | (cl-position (cl-check-key (car cl-seq)) | 363 | (cl--position (cl-check-key (car cl-seq)) |
| 364 | (cdr cl-seq) 0 (1- cl-end))) | 364 | (cdr cl-seq) 0 (1- cl-end))) |
| 365 | (setq cl-seq (cdr cl-seq) cl-end (1- cl-end))) | 365 | (setq cl-seq (cdr cl-seq) cl-end (1- cl-end))) |
| 366 | (let ((cl-p (if (> cl-start 0) (nthcdr (1- cl-start) cl-seq) | 366 | (let ((cl-p (if (> cl-start 0) (nthcdr (1- cl-start) cl-seq) |
| 367 | (setq cl-end (1- cl-end) cl-start 1) cl-seq))) | 367 | (setq cl-end (1- cl-end) cl-start 1) cl-seq))) |
| 368 | (while (and (cdr (cdr cl-p)) (> cl-end 1)) | 368 | (while (and (cdr (cdr cl-p)) (> cl-end 1)) |
| 369 | (if (cl-position (cl-check-key (car (cdr cl-p))) | 369 | (if (cl--position (cl-check-key (car (cdr cl-p))) |
| 370 | (cdr (cdr cl-p)) 0 (1- cl-end)) | 370 | (cdr (cdr cl-p)) 0 (1- cl-end)) |
| 371 | (progn | 371 | (progn |
| 372 | (if cl-copy (setq cl-seq (copy-sequence cl-seq) | 372 | (if cl-copy (setq cl-seq (copy-sequence cl-seq) |
| 373 | cl-p (nthcdr (1- cl-start) cl-seq) | 373 | cl-p (nthcdr (1- cl-start) cl-seq) |
| @@ -376,7 +376,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. | |||
| 376 | (setq cl-p (cdr cl-p))) | 376 | (setq cl-p (cdr cl-p))) |
| 377 | (setq cl-end (1- cl-end) cl-start (1+ cl-start))) | 377 | (setq cl-end (1- cl-end) cl-start (1+ cl-start))) |
| 378 | cl-seq))) | 378 | cl-seq))) |
| 379 | (let ((cl-res (cl-delete-duplicates (append cl-seq nil) cl-keys nil))) | 379 | (let ((cl-res (cl--delete-duplicates (append cl-seq nil) cl-keys nil))) |
| 380 | (if (stringp cl-seq) (concat cl-res) (vconcat cl-res))))) | 380 | (if (stringp cl-seq) (concat cl-res) (vconcat cl-res))))) |
| 381 | 381 | ||
| 382 | ;;;###autoload | 382 | ;;;###autoload |
| @@ -391,7 +391,7 @@ to avoid corrupting the original SEQ. | |||
| 391 | (if (or (eq cl-old cl-new) | 391 | (if (or (eq cl-old cl-new) |
| 392 | (<= (or cl-count (setq cl-from-end nil cl-count 8000000)) 0)) | 392 | (<= (or cl-count (setq cl-from-end nil cl-count 8000000)) 0)) |
| 393 | cl-seq | 393 | cl-seq |
| 394 | (let ((cl-i (cl-position cl-old cl-seq cl-start cl-end))) | 394 | (let ((cl-i (cl--position cl-old cl-seq cl-start cl-end))) |
| 395 | (if (not cl-i) | 395 | (if (not cl-i) |
| 396 | cl-seq | 396 | cl-seq |
| 397 | (setq cl-seq (copy-sequence cl-seq)) | 397 | (setq cl-seq (copy-sequence cl-seq)) |
| @@ -502,9 +502,9 @@ Return the index of the matching item, or nil if not found. | |||
| 502 | \n(fn ITEM SEQ [KEYWORD VALUE]...)" | 502 | \n(fn ITEM SEQ [KEYWORD VALUE]...)" |
| 503 | (cl-parsing-keywords (:test :test-not :key :if :if-not | 503 | (cl-parsing-keywords (:test :test-not :key :if :if-not |
| 504 | (:start 0) :end :from-end) () | 504 | (:start 0) :end :from-end) () |
| 505 | (cl-position cl-item cl-seq cl-start cl-end cl-from-end))) | 505 | (cl--position cl-item cl-seq cl-start cl-end cl-from-end))) |
| 506 | 506 | ||
| 507 | (defun cl-position (cl-item cl-seq cl-start &optional cl-end cl-from-end) | 507 | (defun cl--position (cl-item cl-seq cl-start &optional cl-end cl-from-end) |
| 508 | (if (listp cl-seq) | 508 | (if (listp cl-seq) |
| 509 | (let ((cl-p (nthcdr cl-start cl-seq))) | 509 | (let ((cl-p (nthcdr cl-start cl-seq))) |
| 510 | (or cl-end (setq cl-end 8000000)) | 510 | (or cl-end (setq cl-end 8000000)) |
| @@ -619,8 +619,8 @@ return nil if there are no matches. | |||
| 619 | (cl-if nil) cl-pos) | 619 | (cl-if nil) cl-pos) |
| 620 | (setq cl-end2 (- cl-end2 (1- cl-len))) | 620 | (setq cl-end2 (- cl-end2 (1- cl-len))) |
| 621 | (while (and (< cl-start2 cl-end2) | 621 | (while (and (< cl-start2 cl-end2) |
| 622 | (setq cl-pos (cl-position cl-first cl-seq2 | 622 | (setq cl-pos (cl--position cl-first cl-seq2 |
| 623 | cl-start2 cl-end2 cl-from-end)) | 623 | cl-start2 cl-end2 cl-from-end)) |
| 624 | (apply 'mismatch cl-seq1 cl-seq2 | 624 | (apply 'mismatch cl-seq1 cl-seq2 |
| 625 | :start1 (1+ cl-start1) :end1 cl-end1 | 625 | :start1 (1+ cl-start1) :end1 cl-end1 |
| 626 | :start2 (1+ cl-pos) :end2 (+ cl-pos cl-len) | 626 | :start2 (1+ cl-pos) :end2 (+ cl-pos cl-len) |
| @@ -702,7 +702,7 @@ Return the sublist of LIST whose car matches. | |||
| 702 | (apply 'member* nil cl-list :if-not cl-pred cl-keys)) | 702 | (apply 'member* nil cl-list :if-not cl-pred cl-keys)) |
| 703 | 703 | ||
| 704 | ;;;###autoload | 704 | ;;;###autoload |
| 705 | (defun cl-adjoin (cl-item cl-list &rest cl-keys) | 705 | (defun cl--adjoin (cl-item cl-list &rest cl-keys) |
| 706 | (if (cl-parsing-keywords (:key) t | 706 | (if (cl-parsing-keywords (:key) t |
| 707 | (apply 'member* (cl-check-key cl-item) cl-list cl-keys)) | 707 | (apply 'member* (cl-check-key cl-item) cl-list cl-keys)) |
| 708 | cl-list | 708 | cl-list |
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 971024fcbba..2b56e8a9e4b 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el | |||
| @@ -304,7 +304,7 @@ definitions to shadow the loaded ones for use in file byte-compilation. | |||
| 304 | (while (>= (decf i) 0) (setq v (+ (* v 3) (aref time i)))) | 304 | (while (>= (decf i) 0) (setq v (+ (* v 3) (aref time i)))) |
| 305 | v)) | 305 | v)) |
| 306 | 306 | ||
| 307 | (defvar *gensym-counter* (* (logand (cl-random-time) 1023) 100)) | 307 | (defvar cl--gensym-counter (* (logand (cl-random-time) 1023) 100)) |
| 308 | 308 | ||
| 309 | 309 | ||
| 310 | ;;; Numbers. | 310 | ;;; Numbers. |
| @@ -331,7 +331,7 @@ always returns nil." | |||
| 331 | "Return t if INTEGER is even." | 331 | "Return t if INTEGER is even." |
| 332 | (eq (logand integer 1) 0)) | 332 | (eq (logand integer 1) 0)) |
| 333 | 333 | ||
| 334 | (defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time))) | 334 | (defvar cl--random-state (vector 'cl-random-state-tag -1 30 (cl-random-time))) |
| 335 | 335 | ||
| 336 | (defconst most-positive-float nil | 336 | (defconst most-positive-float nil |
| 337 | "The largest value that a Lisp float can hold. | 337 | "The largest value that a Lisp float can hold. |
| @@ -608,7 +608,7 @@ Otherwise, return LIST unmodified. | |||
| 608 | (if (memq cl-item cl-list) cl-list (cons cl-item cl-list))) | 608 | (if (memq cl-item cl-list) cl-list (cons cl-item cl-list))) |
| 609 | ((or (equal cl-keys '(:test equal)) (null cl-keys)) | 609 | ((or (equal cl-keys '(:test equal)) (null cl-keys)) |
| 610 | (if (member cl-item cl-list) cl-list (cons cl-item cl-list))) | 610 | (if (member cl-item cl-list) cl-list (cons cl-item cl-list))) |
| 611 | (t (apply 'cl-adjoin cl-item cl-list cl-keys)))) | 611 | (t (apply 'cl--adjoin cl-item cl-list cl-keys)))) |
| 612 | 612 | ||
| 613 | (defun subst (cl-new cl-old cl-tree &rest cl-keys) | 613 | (defun subst (cl-new cl-old cl-tree &rest cl-keys) |
| 614 | "Substitute NEW for OLD everywhere in TREE (non-destructively). | 614 | "Substitute NEW for OLD everywhere in TREE (non-destructively). |