/[emacs]/emacs/lisp/subr.el
ViewVC logotype

Diff of /emacs/lisp/subr.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.440 by monnier, Tue Apr 19 18:11:26 2005 UTC revision 1.441 by lute, Thu Apr 21 21:15:51 2005 UTC
# Line 2376  macros." Line 2376  macros."
2376        (eq (car-safe object) 'lambda)))        (eq (car-safe object) 'lambda)))
2377    
2378  (defun assq-delete-all (key alist)  (defun assq-delete-all (key alist)
2379    "Delete from ALIST all elements whose car is KEY.    "Delete from ALIST all elements whose car is `eq' to KEY.
2380  Return the modified alist.  Return the modified alist.
2381  Elements of ALIST that are not conses are ignored."  Elements of ALIST that are not conses are ignored."
2382    (let ((tail alist))    (while (and (consp (car alist))
2383      (while tail                (eq (car (car alist)) key))
2384        (if (and (consp (car tail)) (eq (car (car tail)) key))      (setq alist (cdr alist)))
2385            (setq alist (delq (car tail) alist)))    (let ((tail alist) tail-cdr)
2386        (setq tail (cdr tail)))      (while (setq tail-cdr (cdr tail))
2387      alist))        (if (and (consp (car tail-cdr))
2388                   (eq (car (car tail-cdr)) key))
2389              (setcdr tail (cdr tail-cdr))
2390            (setq tail tail-cdr))))
2391      alist)
2392    
2393    (defun rassq-delete-all (value alist)
2394      "Delete from ALIST all elements whose cdr is `eq' to VALUE.
2395    Return the modified alist.
2396    Elements of ALIST that are not conses are ignored."
2397      (while (and (consp (car alist))
2398                  (eq (cdr (car alist)) value))
2399        (setq alist (cdr alist)))
2400      (let ((tail alist) tail-cdr)
2401        (while (setq tail-cdr (cdr tail))
2402          (if (and (consp (car tail-cdr))
2403                   (eq (cdr (car tail-cdr)) value))
2404              (setcdr tail (cdr tail-cdr))
2405            (setq tail tail-cdr))))
2406      alist)
2407    
2408  (defun make-temp-file (prefix &optional dir-flag suffix)  (defun make-temp-file (prefix &optional dir-flag suffix)
2409    "Create a temporary file.    "Create a temporary file.

Legend:
Removed from v.1.440  
changed lines
  Added in v.1.441

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26