Function: abbrev--suggest-maybe-suggest

abbrev--suggest-maybe-suggest is a byte-compiled function defined in abbrev.el.gz.

Signature

(abbrev--suggest-maybe-suggest)

Documentation

Suggest an abbrev to the user based on the word(s) before point.

Uses abbrev-suggest-hint-threshold to find out if the user should be informed about the existing abbrev.

Source Code

;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun abbrev--suggest-maybe-suggest ()
    "Suggest an abbrev to the user based on the word(s) before point.
Uses `abbrev-suggest-hint-threshold' to find out if the user should be
informed about the existing abbrev."
    (let (words abbrev-found word-count)
      (dolist (expansion (abbrev--suggest-get-active-abbrev-expansions))
	(setq word-count (abbrev--suggest-count-words (car expansion))
	      words (abbrev--suggest-get-previous-words word-count))
	(let ((case-fold-search t))
	  (when (and (> word-count 0)
		     (string-match (car expansion) words)
		     (abbrev--suggest-above-threshold expansion))
	    (setq abbrev-found (abbrev--suggest-shortest-abbrev
				expansion abbrev-found)))))
      (when abbrev-found
	(abbrev--suggest-inform-user abbrev-found))))