• Eli Zaretskii's avatar
    Improve accuracy of apropos commands that search doc strings · cb1e73d1
    Eli Zaretskii authored
    It is conceptually wrong for apropos commands that search doc
    strings to look for matches of several words only on the same
    line, because division of doc strings between lines is
    ephemeral.
    * lisp/apropos.el (apropos-parse-pattern): Accept an optional
    argument MULTILINE-P, and if that is non-nil, produce regexps that
    match words in the list even if they are separated by line
    boundaries.
    (apropos-value, apropos-local-value, apropos-documentation): Use
    the new optional argument in apropos commands that search
    multiline text, such as doc strings.
    
    * src/search.c (Fposix_looking_at, Fposix_string_match)
    (Fposix_search_backward, Fposix_search_forward): Make sure Posix
    appears in the doc strings near REGEXP, for better matches.
    cb1e73d1
search.c 102 KB