Function: completion--merge-suffix
completion--merge-suffix is a byte-compiled function defined in
minibuffer.el.gz.
Signature
(completion--merge-suffix COMPLETION POINT SUFFIX)
Documentation
Merge end of COMPLETION with beginning of SUFFIX.
Simple generalization of the "merge trailing /" done in Emacs-22. Return the new suffix.
Source Code
;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
;;; Basic completion.
(defun completion--merge-suffix (completion point suffix)
"Merge end of COMPLETION with beginning of SUFFIX.
Simple generalization of the \"merge trailing /\" done in Emacs-22.
Return the new suffix."
(if (and (not (zerop (length suffix)))
(string-match "\\(.+\\)\n\\1" (concat completion "\n" suffix)
;; Make sure we don't compress things to less
;; than we started with.
point)
;; Just make sure we didn't match some other \n.
(eq (match-end 1) (length completion)))
(substring suffix (- (match-end 1) (match-beginning 1)))
;; Nothing to merge.
suffix))