mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
65 lines
3.3 KiB
Text
65 lines
3.3 KiB
Text
|
||
(provide (quote dabbrevs))
|
||
|
||
(defvar dabbrevs-limit nil "\
|
||
*Limits region searched by dabbrevs-expand to that many chars away (local).")
|
||
|
||
(make-variable-buffer-local (quote dabbrevs-limit))
|
||
|
||
(defvar dabbrevs-backward-only nil "\
|
||
*If non-NIL, dabbrevs-expand only looks backwards.")
|
||
|
||
(defvar last-dabbrevs-table nil "\
|
||
Table of expansions seen so far. (local)")
|
||
|
||
(make-variable-buffer-local (quote last-dabbrevs-table))
|
||
|
||
(defvar last-dabbrevs-abbreviation "" "\
|
||
Last string we tried to expand. Buffer-local.")
|
||
|
||
(make-variable-buffer-local (quote last-dabbrevs-abbreviation))
|
||
|
||
(defvar last-dabbrevs-direction 0 "\
|
||
Direction of last dabbrevs search. (local)")
|
||
|
||
(make-variable-buffer-local (quote last-dabbrevs-direction))
|
||
|
||
(defvar last-dabbrevs-abbrev-location nil "\
|
||
Location last abbreviation began (local).")
|
||
|
||
(make-variable-buffer-local (quote last-dabbrevs-abbrev-location))
|
||
|
||
(defvar last-dabbrevs-expansion nil "\
|
||
Last expansion of an abbreviation. (local)")
|
||
|
||
(make-variable-buffer-local (quote last-dabbrevs-expansion))
|
||
|
||
(defvar last-dabbrevs-expansion-location nil "\
|
||
Location the last expansion was found. (local)")
|
||
|
||
(make-variable-buffer-local (quote last-dabbrevs-expansion-location))
|
||
|
||
(defun dabbrev-expand (arg) "\
|
||
Expand previous word \"dynamically\".
|
||
Expands to the most recent, preceding word for which this is a prefix.
|
||
If no suitable preceding word is found, words following point are considered.
|
||
|
||
A positive prefix argument, N, says to take the Nth backward DISTINCT
|
||
possibility. A negative argument says search forward. The variable
|
||
dabbrev-backward-only may be used to limit the direction of search to
|
||
backward if set non-nil.
|
||
|
||
If the cursor has not moved from the end of the previous expansion and
|
||
no argument is given, replace the previously-made expansion
|
||
with the next possible expansion not yet tried." (interactive "*P") (byte-code "ÓˆÓÓÓÓÓÓÓ… |