[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el,v |
Date: |
Mon, 24 Jul 2006 17:01:09 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 06/07/24 17:01:09
Index: subr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/subr.el,v
retrieving revision 1.521
retrieving revision 1.522
diff -u -b -r1.521 -r1.522
--- subr.el 18 Jul 2006 01:34:48 -0000 1.521
+++ subr.el 24 Jul 2006 17:01:08 -0000 1.522
@@ -108,6 +108,9 @@
(declare (indent 1) (debug t))
(cons 'if (cons cond (cons nil body))))
+(defvar --dolist-tail-- nil
+ "Temporary variable used in `dolist' expansion.")
+
(defmacro dolist (spec &rest body)
"Loop over a list.
Evaluate BODY with VAR bound to each car from LIST, in turn.
@@ -115,16 +118,22 @@
\(fn (VAR LIST [RESULT]) BODY...)"
(declare (indent 1) (debug ((symbolp form &optional form) body)))
- (let ((temp (make-symbol "--dolist-temp--")))
+ ;; It would be cleaner to create an uninterned symbol,
+ ;; but that uses a lot more space when many functions in many files
+ ;; use dolist.
+ (let ((temp '--dolist-tail--))
`(let ((,temp ,(nth 1 spec))
,(car spec))
(while ,temp
(setq ,(car spec) (car ,temp))
- (setq ,temp (cdr ,temp))
- ,@body)
+ ,@body
+ (setq ,temp (cdr ,temp)))
,@(if (cdr (cdr spec))
`((setq ,(car spec) nil) ,@(cdr (cdr spec)))))))
+(defvar --dotimes-limit-- nil
+ "Temporary variable used in `dotimes' expansion.")
+
(defmacro dotimes (spec &rest body)
"Loop a certain number of times.
Evaluate BODY with VAR bound to successive integers running from 0,
@@ -133,7 +142,10 @@
\(fn (VAR COUNT [RESULT]) BODY...)"
(declare (indent 1) (debug dolist))
- (let ((temp (make-symbol "--dotimes-temp--"))
+ ;; It would be cleaner to create an uninterned symbol,
+ ;; but that uses a lot more space when many functions in many files
+ ;; use dotimes.
+ (let ((temp '--dotimes-limit--)
(start 0)
(end (nth 1 spec)))
`(let ((,temp ,end)
@@ -2531,8 +2543,9 @@
(defun looking-back (regexp &optional limit greedy)
"Return non-nil if text before point matches regular expression REGEXP.
Like `looking-at' except matches before point, and is slower.
-LIMIT if non-nil speeds up the search by specifying how far back the
-match can start.
+LIMIT if non-nil speeds up the search by specifying a minimum
+starting position, to avoid checking matches that would start
+before LIMIT.
If GREEDY is non-nil, extend the match backwards as far as possible,
stopping when a single additional previous character cannot be part
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Richard M. Stallman, 2006/07/08
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Chong Yidong, 2006/07/10
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Kim F. Storm, 2006/07/10
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Chong Yidong, 2006/07/17
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/lisp/subr.el,v, Chong Yidong, 2006/07/26