Function: pcomplete--common-suffix
pcomplete--common-suffix is a byte-compiled function defined in
pcomplete.el.gz.
Signature
(pcomplete--common-suffix S1 S2)
Source Code
;; Defined in /usr/src/emacs/lisp/pcomplete.el.gz
(defun pcomplete--common-suffix (s1 s2)
;; Since S2 is expected to be the "unquoted/expanded" version of S1,
;; there shouldn't be any case difference, even if the completion is
;; case-insensitive.
(let ((case-fold-search nil))
(string-match
;; \x3FFF7F is just an arbitrary char among the ones Emacs accepts
;; that hopefully will never appear in normal text.
"\\(?:.\\|\n\\)*?\\(\\(?:.\\|\n\\)*\\)\x3FFF7F\\(?:.\\|\n\\)*\\1\\'"
(concat s1 "\x3FFF7F" s2))
(- (match-end 1) (match-beginning 1))))