Function: try-expand-all-abbrevs
try-expand-all-abbrevs is a byte-compiled function defined in
hippie-exp.el.gz.
Signature
(try-expand-all-abbrevs OLD)
Documentation
Try to expand word before point according to all abbrev tables.
The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible expansions of the same string). It returns t if a new expansion is found, nil otherwise.
Source Code
;; Defined in /usr/src/emacs/lisp/hippie-exp.el.gz
(defun try-expand-all-abbrevs (old)
"Try to expand word before point according to all abbrev tables.
The argument OLD has to be nil the first call of this function, and t
for subsequent calls (for further possible expansions of the same
string). It returns t if a new expansion is found, nil otherwise."
(if (not old)
(progn
(he-init-string (he-dabbrev-beg) (point))
(setq he-expand-list
(and (not (equal he-search-string ""))
(mapcar (lambda (sym)
(if (and (boundp sym)
(abbrev-table-p (symbol-value sym)))
(abbrev-expansion (downcase he-search-string)
(symbol-value sym))))
(append '(local-abbrev-table
global-abbrev-table)
abbrev-table-name-list))))))
(while (and he-expand-list
(or (not (car he-expand-list))
(he-string-member (car he-expand-list) he-tried-table t)))
(setq he-expand-list (cdr he-expand-list)))
(if (null he-expand-list)
(progn
(if old (he-reset-string))
())
(progn
(he-substitute-string (car he-expand-list) t)
(setq he-expand-list (cdr he-expand-list))
t)))