emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl-macs.el [emacs-unicode


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl-macs.el [emacs-unicode-2]
Date: Mon, 28 Jun 2004 04:57:12 -0400

Index: emacs/lisp/emacs-lisp/cl-macs.el
diff -c emacs/lisp/emacs-lisp/cl-macs.el:1.42.2.2 
emacs/lisp/emacs-lisp/cl-macs.el:1.42.2.3
*** emacs/lisp/emacs-lisp/cl-macs.el:1.42.2.2   Fri Apr 16 12:50:13 2004
--- emacs/lisp/emacs-lisp/cl-macs.el    Mon Jun 28 07:29:45 2004
***************
*** 164,184 ****
  ;;; Symbols.
  
  (defvar *gensym-counter*)
! (defun gensym (&optional arg)
    "Generate a new uninterned symbol.
  The name is made by appending a number to PREFIX, default \"G\"."
!   (let ((prefix (if (stringp arg) arg "G"))
!       (num (if (integerp arg) arg
               (prog1 *gensym-counter*
                 (setq *gensym-counter* (1+ *gensym-counter*))))))
!     (make-symbol (format "%s%d" prefix num))))
  
! (defun gentemp (&optional arg)
    "Generate a new interned symbol with a unique name.
  The name is made by appending a number to PREFIX, default \"G\"."
!   (let ((prefix (if (stringp arg) arg "G"))
        name)
!     (while (intern-soft (setq name (format "%s%d" prefix *gensym-counter*)))
        (setq *gensym-counter* (1+ *gensym-counter*)))
      (intern name)))
  
--- 164,184 ----
  ;;; Symbols.
  
  (defvar *gensym-counter*)
! (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*))))))
!     (make-symbol (format "%s%d" pfix num))))
  
! (defun gentemp (&optional prefix)
    "Generate a new interned symbol with a unique name.
  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*)))
      (intern name)))
  
***************
*** 1177,1188 ****
  
  (defmacro do (steps endtest &rest body)
    "The Common Lisp `do' loop.
! Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)"
    (cl-expand-do-loop steps endtest body nil))
  
  (defmacro do* (steps endtest &rest body)
    "The Common Lisp `do*' loop.
! Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)"
    (cl-expand-do-loop steps endtest body t))
  
  (defun cl-expand-do-loop (steps endtest body star)
--- 1177,1190 ----
  
  (defmacro do (steps endtest &rest body)
    "The Common Lisp `do' loop.
! 
! \(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)"
    (cl-expand-do-loop steps endtest body nil))
  
  (defmacro do* (steps endtest &rest body)
    "The Common Lisp `do*' loop.
! 
! \(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)"
    (cl-expand-do-loop steps endtest body t))
  
  (defun cl-expand-do-loop (steps endtest body star)
***************
*** 2398,2407 ****
          ((eq (car type) 'satisfies) (list (cadr type) val))
          (t (error "Bad type spec: %s" type)))))
  
! (defun typep (val type)   ; See compiler macro below.
    "Check that OBJECT is of type TYPE.
  TYPE is a Common Lisp-style type specifier."
!   (eval (cl-make-type-test 'val type)))
  
  (defmacro check-type (form type &optional string)
    "Verify that FORM is of type TYPE; signal an error if not.
--- 2400,2409 ----
          ((eq (car type) 'satisfies) (list (cadr type) val))
          (t (error "Bad type spec: %s" type)))))
  
! (defun typep (object type)   ; See compiler macro below.
    "Check that OBJECT is of type TYPE.
  TYPE is a Common Lisp-style type specifier."
!   (eval (cl-make-type-test 'object type)))
  
  (defmacro check-type (form type &optional string)
    "Verify that FORM is of type TYPE; signal an error if not.
***************
*** 2438,2445 ****
               nil))))
  
  (defmacro ignore-errors (&rest body)
!   "Execute FORMS; if an error occurs, return nil.
! Otherwise, return result of last FORM."
    `(condition-case nil (progn ,@body) (error nil)))
  
  
--- 2440,2447 ----
               nil))))
  
  (defmacro ignore-errors (&rest body)
!   "Execute BODY; if an error occurs, return nil.
! Otherwise, return result of last form in BODY."
    `(condition-case nil (progn ,@body) (error nil)))
  
  




reply via email to

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