comparison lisp/apropos.el @ 52101:f3610e8bfe2d

(apropos-words-to-regexp): Only add `wild' if `words' has more than one member.
author Andreas Schwab <schwab@suse.de>
date Sat, 02 Aug 2003 20:35:38 +0000
parents 8604d171445a
children 695cf19ef79e
comparison
equal deleted inserted replaced
52100:c91248761df3 52101:f3610e8bfe2d
1 ;;; apropos.el --- apropos commands for users and programmers 1 ;;; apropos.el --- apropos commands for users and programmers
2 2
3 ;; Copyright (C) 1989, 1994, 1995, 2001, 2002 Free Software Foundation, Inc. 3 ;; Copyright (C) 1989, 1994, 1995, 2001, 2002, 2003 Free Software Foundation, Inc.
4 4
5 ;; Author: Joe Wells <jbw@bigbird.bu.edu> 5 ;; Author: Joe Wells <jbw@bigbird.bu.edu>
6 ;; Rewritten: Daniel Pfeiffer <occitan@esperanto.org> 6 ;; Rewritten: Daniel Pfeiffer <occitan@esperanto.org>
7 ;; Keywords: help 7 ;; Keywords: help
8 8
246 246
247 (defun apropos-words-to-regexp (words wild) 247 (defun apropos-words-to-regexp (words wild)
248 "Make regexp matching any two of the words in WORDS." 248 "Make regexp matching any two of the words in WORDS."
249 (concat "\\(" 249 (concat "\\("
250 (mapconcat 'identity words "\\|") 250 (mapconcat 'identity words "\\|")
251 "\\)" wild 251 "\\)"
252 (if (cdr words) 252 (if (cdr words)
253 (concat "\\(" 253 (concat wild
254 "\\("
254 (mapconcat 'identity words "\\|") 255 (mapconcat 'identity words "\\|")
255 "\\)") 256 "\\)")
256 ""))) 257 "")))
257 258
258 (defun apropos-rewrite-regexp (regexp) 259 (defun apropos-rewrite-regexp (regexp)