From 617631c0f39083d73c5007d0612f689ea941642a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 29 Dec 2003 19:56:54 +0000 Subject: [PATCH] (assoc-ignore-case, assoc-ignore-representation): Use assoc-string, and mark them obsolete. (delay-mode-hooks): Mark as permanent local. --- lisp/subr.el | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index e760936572b..a2b09d6b63b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -298,27 +298,19 @@ If TEST is omitted or nil, `equal' is used." (setq tail (cdr tail))) value)) +(make-obsolete 'assoc-ignore-case 'assoc-string) (defun assoc-ignore-case (key alist) "Like `assoc', but ignores differences in case and text representation. KEY must be a string. Upper-case and lower-case letters are treated as equal. Unibyte strings are converted to multibyte for comparison." - (let (element) - (while (and alist (not element)) - (if (eq t (compare-strings key 0 nil (car (car alist)) 0 nil t)) - (setq element (car alist))) - (setq alist (cdr alist))) - element)) + (assoc-string key alist t)) +(make-obsolete 'assoc-ignore-representation 'assoc-string) (defun assoc-ignore-representation (key alist) "Like `assoc', but ignores differences in text representation. KEY must be a string. Unibyte strings are converted to multibyte for comparison." - (let (element) - (while (and alist (not element)) - (if (eq t (compare-strings key 0 nil (car (car alist)) 0 nil)) - (setq element (car alist))) - (setq alist (cdr alist))) - element)) + (assoc-string key alist nil)) (defun member-ignore-case (elt list) "Like `member', but ignores differences in case and text representation. @@ -1820,6 +1812,7 @@ in BODY." (defvar delayed-mode-hooks nil "List of delayed mode hooks waiting to be run.") (make-variable-buffer-local 'delayed-mode-hooks) +(put 'delay-mode-hooks 'permanent-local t) (defun run-mode-hooks (&rest hooks) "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. -- 2.39.2