[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding rassq-delete-all to lisp/subr.el.
From: |
Lute Kamstra |
Subject: |
Re: Adding rassq-delete-all to lisp/subr.el. |
Date: |
Wed, 20 Apr 2005 11:41:18 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> lisp/subr.el currently defines assq-delete-all. What about providing
> rassq-delete-all as well?
>
> Why?
>
> I don't want to add functions to Emacs merely for completeness' sake.
I could use it for removing things from auto-mode-alist:
Index: lisp/loadhist.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/loadhist.el,v
retrieving revision 1.32
diff -C2 -r1.32 loadhist.el
*** lisp/loadhist.el 19 Apr 2005 15:08:05 -0000 1.32
--- lisp/loadhist.el 19 Apr 2005 20:27:30 -0000
***************
*** 189,194 ****
(memq x unload-feature-special-hooks))) ; Known
abnormal hooks etc.
(dolist (y unload-hook-features-list)
! (when (eq (car-safe y) 'defun)
! (remove-hook x (cdr y))))))))
(when (fboundp 'elp-restore-function) ; remove ELP stuff first
(dolist (elt unload-hook-features-list)
--- 189,201 ----
(memq x unload-feature-special-hooks))) ; Known
abnormal hooks etc.
(dolist (y unload-hook-features-list)
! (when (and (eq (car-safe y) 'defun)
! (not (get (cdr y) 'autoload)))
! (remove-hook x (cdr y)))))))
! ;; Remove any feature-symbols from auto-mode-alist as well.
! (dolist (y unload-hook-features-list)
! (when (and (eq (car-safe y) 'defun)
! (not (get (cdr y) 'autoload)))
! (setq auto-mode-alist
! (rassq-delete-all (cdr y) auto-mode-alist)))))
(when (fboundp 'elp-restore-function) ; remove ELP stuff first
(dolist (elt unload-hook-features-list)