emacs/lisp/dabbrev.elc
2017-10-18 13:31:44 -04:00

65 lines
3.3 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(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 "ÓˆÓÓÓÓÓÓÓ Š
?…+  =…+
ƒ?ˆˆz
?ƒRƒN×OØVÙ
!‰ˆ`‰ˆÚÛ!ˆ`‰
ˆÜ` \"‰ˆˆÓ‰ˆÓ‰ˆÝÞ!ßQ‰ˆ ØY…Ñ× ]‰ˆ…™bˆ
ØV…©àÕ#‰…Áá ‰ˆ B‰ˆ
S‰ˆ‚šˆ †ÊÓ‰ˆ× ^‰ˆ ØX…Ú ?…× []‰ˆ…ìbˆ
ØV…üàÓ#‰á ‰ˆ B‰ˆ
S‰ˆ‚íˆÛ‰)ˆ ?ƒMâ
\"Ó‰
ˆ?…;ã ˆä
G!ˆcˆåƒFæGç\")‚•ã ˆè
!ˆ…eâ ×ÓOé ×ÓO!\"ŠêÕë#)ˆì!ˆêƒé !‚€ ?ë#)ˆˆˆ .‡" [abbrev expansion old which loc n pattern do-case case-fold-search case-replace arg last-command this-command last-dabbrevs-abbrev-location last-dabbrevs-abbreviation last-dabbrevs-expansion last-dabbrevs-direction dabbrevs-backward-only last-dabbrevs-expansion-location nil last-dabbrev-table t first 1 0 prefix-numeric-value forward-word -1 buffer-substring "\\b" regexp-quote "\\(\\sw\\|\\s_\\)+" dabbrevs-search point-marker string= undo-boundary delete-backward-char error "No dynamic expansion for \"%s\" found." "No further dynamic expansions for \"%s\" found." search-backward downcase replace-match literal search-forward] 23))
(defun dabbrevs-search (pattern reverse do-case) (byte-code "ÅÅŒ
Ë
ƒÍ‚Î\"\\\"ˆÅ‰ˆÅ‰ˆ ?…*?…‘ ƒ:ÏÅÇ#@ÐÅÇ#?‰ˆ?…<>ÑÒÓ!ÔÓ!\"‰ˆ …v
ƒoÕÖ@!Ö !\"uÕ@ \"?…ƒA‰ˆXˆ…ŒÅ‰)ˆ#ˆ )*‡" [missing result dabbrevs-limit last-dabbrevs-abbrev-location reverse nil pattern t test last-dabbrev-table do-case narrow-to-region * -1 1 re-search-backward re-search-forward buffer-substring match-beginning 0 match-end string= downcase] 15))