From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: Re: Adding rassq-delete-all to lisp/subr.el. Date: Wed, 20 Apr 2005 11:41:18 +0200 Message-ID: <87fyxlwzsx.fsf@xs4all.nl> References: <87k6my7v56.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113991323 19026 80.91.229.2 (20 Apr 2005 10:02:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Apr 2005 10:02:03 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 20 12:02:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DOC1w-00005a-9m for ged-emacs-devel@m.gmane.org; Wed, 20 Apr 2005 12:02:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOC6Q-0002x0-HZ for ged-emacs-devel@m.gmane.org; Wed, 20 Apr 2005 06:06:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DOC2H-0002B2-Oh for emacs-devel@gnu.org; Wed, 20 Apr 2005 06:02:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DOC2F-0002AW-FL for emacs-devel@gnu.org; Wed, 20 Apr 2005 06:02:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOC2E-0000vD-V7 for emacs-devel@gnu.org; Wed, 20 Apr 2005 06:02:18 -0400 Original-Received: from [194.109.24.28] (helo=smtp-vbr8.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DOBkL-0005Ka-70; Wed, 20 Apr 2005 05:43:49 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr8.xs4all.nl (8.12.11/8.12.11) with ESMTP id j3K9fIIB077892; Wed, 20 Apr 2005 11:41:18 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DOBhu-0001pr-00; Wed, 20 Apr 2005 11:41:18 +0200 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Tue, 19 Apr 2005 18:27:50 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 40 X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36149 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36149 Richard Stallman 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)