aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/minibuf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index cc6859bfb1b..667799bf170 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2073,9 +2073,10 @@ do_completion ()
2073/* Like assoc but assumes KEY is a string, and ignores case if appropriate. */ 2073/* Like assoc but assumes KEY is a string, and ignores case if appropriate. */
2074 2074
2075DEFUN ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0, 2075DEFUN ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0,
2076 doc: /* Like `assoc' but specifically for strings. 2076 doc: /* Like `assoc' but specifically for strings (and symbols).
2077Unibyte strings are converted to multibyte for comparison. 2077Symbols are converted to strings, and unibyte strings are converted to
2078And case is ignored if CASE-FOLD is non-nil. 2078multibyte for comparison.
2079Case is ignored if optional arg CASE-FOLD is non-nil.
2079As opposed to `assoc', it will also match an entry consisting of a single 2080As opposed to `assoc', it will also match an entry consisting of a single
2080string rather than a cons cell whose car is a string. */) 2081string rather than a cons cell whose car is a string. */)
2081 (key, list, case_fold) 2082 (key, list, case_fold)
@@ -2084,6 +2085,9 @@ string rather than a cons cell whose car is a string. */)
2084{ 2085{
2085 register Lisp_Object tail; 2086 register Lisp_Object tail;
2086 2087
2088 if (SYMBOLP (key))
2089 key = Fsymbol_name (key);
2090
2087 for (tail = list; !NILP (tail); tail = Fcdr (tail)) 2091 for (tail = list; !NILP (tail); tail = Fcdr (tail))
2088 { 2092 {
2089 register Lisp_Object elt, tem, thiscar; 2093 register Lisp_Object elt, tem, thiscar;