Commit 617631c0 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(assoc-ignore-case, assoc-ignore-representation):

Use assoc-string, and mark them obsolete.
(delay-mode-hooks): Mark as permanent local.
parent 9462bf2c
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment