emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108268: Minor renaming of interna


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108268: Minor renaming of internal CL functions and variables.
Date: Fri, 02 Nov 2012 02:29:20 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108268
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2012-05-17 16:04:56 -0400
message:
  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*.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/cl-extra.el
  lisp/emacs-lisp/cl-loaddefs.el
  lisp/emacs-lisp/cl-macs.el
  lisp/emacs-lisp/cl-seq.el
  lisp/emacs-lisp/cl.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-05-17 15:15:51 +0000
+++ b/lisp/ChangeLog    2012-05-17 20:04:56 +0000
@@ -1,5 +1,14 @@
 2012-05-17  Stefan Monnier  <address@hidden>
 
+       Minor renaming of internal CL functions and variables.
+       * 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.
+       * emacs-lisp/cl.el (cl--gensym-counter): Rename from *gensym-counter*.
+       (cl--random-state): Rename from *random-state*.
+
+2012-05-17  Stefan Monnier  <address@hidden>
+
        * emacs-lisp/cl-macs.el (cl-transform-lambda): Don't add spurious
        parens around the arg list (bug#11499).
 

=== modified file 'lisp/emacs-lisp/cl-extra.el'
--- a/lisp/emacs-lisp/cl-extra.el       2012-04-16 19:20:42 +0000
+++ b/lisp/emacs-lisp/cl-extra.el       2012-05-17 20:04:56 +0000
@@ -434,7 +434,7 @@
 (defun random* (lim &optional state)
   "Return a random nonnegative number less than LIM, an integer or float.
 Optional second arg STATE is a random-state object."
-  (or state (setq state *random-state*))
+  (or state (setq state cl--random-state))
   ;; Inspired by "ran3" from Numerical Recipes.  Additive congruential method.
   (let ((vec (aref state 3)))
     (if (integerp vec)
@@ -457,9 +457,9 @@
 
 ;;;###autoload
 (defun make-random-state (&optional state)
-  "Return a copy of random-state STATE, or of `*random-state*' if omitted.
+  "Return a copy of random-state STATE, or of the internal state if omitted.
 If STATE is t, return a new state object seeded from the time of day."
-  (cond ((null state) (make-random-state *random-state*))
+  (cond ((null state) (make-random-state cl--random-state))
        ((vectorp state) (cl-copy-tree state t))
        ((integerp state) (vector 'cl-random-state-tag -1 30 state))
        (t (make-random-state (cl-random-time)))))

=== modified file 'lisp/emacs-lisp/cl-loaddefs.el'
--- a/lisp/emacs-lisp/cl-loaddefs.el    2012-05-06 16:45:46 +0000
+++ b/lisp/emacs-lisp/cl-loaddefs.el    2012-05-17 20:04:56 +0000
@@ -10,7 +10,7 @@
 ;;;;;;  ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p
 ;;;;;;  cl-map-overlays cl-map-intervals cl-map-keymap-recursively
 ;;;;;;  notevery notany every some mapcon mapcan mapl maplist map
-;;;;;;  cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" 
"5a8a7f7ec2dc453113b8cbda577f2acb")
+;;;;;;  cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" 
"1a3a04c6a0286373093bea4b9bcf2e91")
 ;;; Generated autoloads from cl-extra.el
 
 (autoload 'coerce "cl-extra" "\
@@ -169,7 +169,7 @@
 \(fn LIM &optional STATE)" nil nil)
 
 (autoload 'make-random-state "cl-extra" "\
-Return a copy of random-state STATE, or of `*random-state*' if omitted.
+Return a copy of random-state STATE, or of the internal state if omitted.
 If STATE is t, return a new state object seeded from the time of day.
 
 \(fn &optional STATE)" nil nil)
@@ -286,7 +286,7 @@
 ;;;;;;  flet progv psetq do-all-symbols do-symbols dotimes dolist
 ;;;;;;  do* do loop return-from return block etypecase typecase ecase
 ;;;;;;  case load-time-value eval-when destructuring-bind function*
-;;;;;;  defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" 
"e10ebd95224fcfbe6a5edc59f40d695a")
+;;;;;;  defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" 
"69ccd3344cea28acc44dd28eca07292f")
 ;;; Generated autoloads from cl-macs.el
 
 (autoload 'gensym "cl-macs" "\
@@ -764,13 +764,13 @@
 ;;;;;;  nsubst subst-if-not subst-if subsetp nset-exclusive-or set-exclusive-or
 ;;;;;;  nset-difference set-difference nintersection intersection
 ;;;;;;  nunion union rassoc-if-not rassoc-if rassoc* assoc-if-not
-;;;;;;  assoc-if assoc* cl-adjoin member-if-not member-if member*
+;;;;;;  assoc-if assoc* cl--adjoin member-if-not member-if member*
 ;;;;;;  merge stable-sort sort* search mismatch count-if-not count-if
 ;;;;;;  count position-if-not position-if position find-if-not find-if
 ;;;;;;  find nsubstitute-if-not nsubstitute-if nsubstitute substitute-if-not
 ;;;;;;  substitute-if substitute delete-duplicates remove-duplicates
 ;;;;;;  delete-if-not delete-if delete* remove-if-not remove-if remove*
-;;;;;;  replace fill reduce) "cl-seq" "cl-seq.el" 
"99095e49c83af1c8bec0fdcf517b3f95")
+;;;;;;  replace fill reduce) "cl-seq" "cl-seq.el" 
"2d8563fcbdf4bc77e569d0aeb0a35cfc")
 ;;; Generated autoloads from cl-seq.el
 
 (autoload 'reduce "cl-seq" "\
@@ -1047,7 +1047,7 @@
 
 \(fn PREDICATE LIST [KEYWORD VALUE]...)" nil nil)
 
-(autoload 'cl-adjoin "cl-seq" "\
+(autoload 'cl--adjoin "cl-seq" "\
 
 
 \(fn CL-ITEM CL-LIST &rest CL-KEYS)" nil nil)

=== modified file 'lisp/emacs-lisp/cl-macs.el'
--- a/lisp/emacs-lisp/cl-macs.el        2012-05-17 15:15:51 +0000
+++ b/lisp/emacs-lisp/cl-macs.el        2012-05-17 20:04:56 +0000
@@ -167,15 +167,15 @@
 
 ;;; Symbols.
 
-(defvar *gensym-counter*)
+(defvar cl--gensym-counter)
 ;;;###autoload
 (defun gensym (&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 *gensym-counter*
-                (setq *gensym-counter* (1+ *gensym-counter*))))))
+              (prog1 cl--gensym-counter
+                (setq cl--gensym-counter (1+ cl--gensym-counter))))))
     (make-symbol (format "%s%d" pfix num))))
 
 ;;;###autoload
@@ -184,8 +184,8 @@
 The name is made by appending a number to PREFIX, default \"G\"."
   (let ((pfix (if (stringp prefix) prefix "G"))
        name)
-    (while (intern-soft (setq name (format "%s%d" pfix *gensym-counter*)))
-      (setq *gensym-counter* (1+ *gensym-counter*)))
+    (while (intern-soft (setq name (format "%s%d" pfix cl--gensym-counter)))
+      (setq cl--gensym-counter (1+ cl--gensym-counter)))
     (intern name)))
 
 

=== modified file 'lisp/emacs-lisp/cl-seq.el'
--- a/lisp/emacs-lisp/cl-seq.el 2012-01-19 07:21:25 +0000
+++ b/lisp/emacs-lisp/cl-seq.el 2012-05-17 20:04:56 +0000
@@ -213,8 +213,8 @@
     (if (<= (or cl-count (setq cl-count 8000000)) 0)
        cl-seq
       (if (or (nlistp cl-seq) (and cl-from-end (< cl-count 4000000)))
-         (let ((cl-i (cl-position cl-item cl-seq cl-start cl-end
-                                  cl-from-end)))
+         (let ((cl-i (cl--position cl-item cl-seq cl-start cl-end
+                                    cl-from-end)))
            (if cl-i
                (let ((cl-res (apply 'delete* cl-item (append cl-seq nil)
                                     (append (if cl-from-end
@@ -279,8 +279,8 @@
          (if (and cl-from-end (< cl-count 4000000))
              (let (cl-i)
                (while (and (>= (setq cl-count (1- cl-count)) 0)
-                           (setq cl-i (cl-position cl-item cl-seq cl-start
-                                                   cl-end cl-from-end)))
+                           (setq cl-i (cl--position cl-item cl-seq cl-start
+                                                     cl-end cl-from-end)))
                  (if (= cl-i 0) (setq cl-seq (cdr cl-seq))
                    (let ((cl-tail (nthcdr (1- cl-i) cl-seq)))
                      (setcdr cl-tail (cdr (cdr cl-tail)))))
@@ -330,16 +330,16 @@
   "Return a copy of SEQ with all duplicate elements removed.
 \nKeywords supported:  :test :test-not :key :start :end :from-end
 \n(fn SEQ [KEYWORD VALUE]...)"
-  (cl-delete-duplicates cl-seq cl-keys t))
+  (cl--delete-duplicates cl-seq cl-keys t))
 
 ;;;###autoload
 (defun delete-duplicates (cl-seq &rest cl-keys)
   "Remove all duplicate elements from SEQ (destructively).
 \nKeywords supported:  :test :test-not :key :start :end :from-end
 \n(fn SEQ [KEYWORD VALUE]...)"
-  (cl-delete-duplicates cl-seq cl-keys nil))
+  (cl--delete-duplicates cl-seq cl-keys nil))
 
-(defun cl-delete-duplicates (cl-seq cl-keys cl-copy)
+(defun cl--delete-duplicates (cl-seq cl-keys cl-copy)
   (if (listp cl-seq)
       (cl-parsing-keywords (:test :test-not :key (:start 0) :end :from-end :if)
          ()
@@ -348,8 +348,8 @@
              (setq cl-end (- (or cl-end (length cl-seq)) cl-start))
              (while (> cl-end 1)
                (setq cl-i 0)
-               (while (setq cl-i (cl-position (cl-check-key (car cl-p))
-                                              (cdr cl-p) cl-i (1- cl-end)))
+               (while (setq cl-i (cl--position (cl-check-key (car cl-p))
+                                                (cdr cl-p) cl-i (1- cl-end)))
                  (if cl-copy (setq cl-seq (copy-sequence cl-seq)
                                    cl-p (nthcdr cl-start cl-seq) cl-copy nil))
                  (let ((cl-tail (nthcdr cl-i cl-p)))
@@ -360,14 +360,14 @@
              cl-seq)
          (setq cl-end (- (or cl-end (length cl-seq)) cl-start))
          (while (and (cdr cl-seq) (= cl-start 0) (> cl-end 1)
-                     (cl-position (cl-check-key (car cl-seq))
-                                  (cdr cl-seq) 0 (1- cl-end)))
+                     (cl--position (cl-check-key (car cl-seq))
+                                    (cdr cl-seq) 0 (1- cl-end)))
            (setq cl-seq (cdr cl-seq) cl-end (1- cl-end)))
          (let ((cl-p (if (> cl-start 0) (nthcdr (1- cl-start) cl-seq)
                        (setq cl-end (1- cl-end) cl-start 1) cl-seq)))
            (while (and (cdr (cdr cl-p)) (> cl-end 1))
-             (if (cl-position (cl-check-key (car (cdr cl-p)))
-                              (cdr (cdr cl-p)) 0 (1- cl-end))
+             (if (cl--position (cl-check-key (car (cdr cl-p)))
+                                (cdr (cdr cl-p)) 0 (1- cl-end))
                  (progn
                    (if cl-copy (setq cl-seq (copy-sequence cl-seq)
                                      cl-p (nthcdr (1- cl-start) cl-seq)
@@ -376,7 +376,7 @@
                (setq cl-p (cdr cl-p)))
              (setq cl-end (1- cl-end) cl-start (1+ cl-start)))
            cl-seq)))
-    (let ((cl-res (cl-delete-duplicates (append cl-seq nil) cl-keys nil)))
+    (let ((cl-res (cl--delete-duplicates (append cl-seq nil) cl-keys nil)))
       (if (stringp cl-seq) (concat cl-res) (vconcat cl-res)))))
 
 ;;;###autoload
@@ -391,7 +391,7 @@
     (if (or (eq cl-old cl-new)
            (<= (or cl-count (setq cl-from-end nil cl-count 8000000)) 0))
        cl-seq
-      (let ((cl-i (cl-position cl-old cl-seq cl-start cl-end)))
+      (let ((cl-i (cl--position cl-old cl-seq cl-start cl-end)))
        (if (not cl-i)
            cl-seq
          (setq cl-seq (copy-sequence cl-seq))
@@ -502,9 +502,9 @@
 \n(fn ITEM SEQ [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not
                        (:start 0) :end :from-end) ()
-    (cl-position cl-item cl-seq cl-start cl-end cl-from-end)))
+    (cl--position cl-item cl-seq cl-start cl-end cl-from-end)))
 
-(defun cl-position (cl-item cl-seq cl-start &optional cl-end cl-from-end)
+(defun cl--position (cl-item cl-seq cl-start &optional cl-end cl-from-end)
   (if (listp cl-seq)
       (let ((cl-p (nthcdr cl-start cl-seq)))
        (or cl-end (setq cl-end 8000000))
@@ -619,8 +619,8 @@
             (cl-if nil) cl-pos)
        (setq cl-end2 (- cl-end2 (1- cl-len)))
        (while (and (< cl-start2 cl-end2)
-                   (setq cl-pos (cl-position cl-first cl-seq2
-                                             cl-start2 cl-end2 cl-from-end))
+                   (setq cl-pos (cl--position cl-first cl-seq2
+                                               cl-start2 cl-end2 cl-from-end))
                    (apply 'mismatch cl-seq1 cl-seq2
                           :start1 (1+ cl-start1) :end1 cl-end1
                           :start2 (1+ cl-pos) :end2 (+ cl-pos cl-len)
@@ -702,7 +702,7 @@
   (apply 'member* nil cl-list :if-not cl-pred cl-keys))
 
 ;;;###autoload
-(defun cl-adjoin (cl-item cl-list &rest cl-keys)
+(defun cl--adjoin (cl-item cl-list &rest cl-keys)
   (if (cl-parsing-keywords (:key) t
        (apply 'member* (cl-check-key cl-item) cl-list cl-keys))
       cl-list

=== modified file 'lisp/emacs-lisp/cl.el'
--- a/lisp/emacs-lisp/cl.el     2012-01-19 07:21:25 +0000
+++ b/lisp/emacs-lisp/cl.el     2012-05-17 20:04:56 +0000
@@ -304,7 +304,7 @@
     (while (>= (decf i) 0) (setq v (+ (* v 3) (aref time i))))
     v))
 
-(defvar *gensym-counter* (* (logand (cl-random-time) 1023) 100))
+(defvar cl--gensym-counter (* (logand (cl-random-time) 1023) 100))
 
 
 ;;; Numbers.
@@ -331,7 +331,7 @@
   "Return t if INTEGER is even."
   (eq (logand integer 1) 0))
 
-(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
+(defvar cl--random-state (vector 'cl-random-state-tag -1 30 (cl-random-time)))
 
 (defconst most-positive-float nil
   "The largest value that a Lisp float can hold.
@@ -608,7 +608,7 @@
         (if (memq cl-item cl-list) cl-list (cons cl-item cl-list)))
        ((or (equal cl-keys '(:test equal)) (null cl-keys))
         (if (member cl-item cl-list) cl-list (cons cl-item cl-list)))
-       (t (apply 'cl-adjoin cl-item cl-list cl-keys))))
+       (t (apply 'cl--adjoin cl-item cl-list cl-keys))))
 
 (defun subst (cl-new cl-old cl-tree &rest cl-keys)
   "Substitute NEW for OLD everywhere in TREE (non-destructively).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]