;ELC   
;;; Compiled by rms@psilocin.gnu.org on Mon Jan 19 15:32:15 1998
;;; from file /gd/gnu/emacs/lisp/expand.el
;;; in Emacs version 20.2.83.3
;;; with bytecomp version 2.35
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`expand.el' was compiled for Emacs 19.29 or later"))


(custom-declare-group 'expand nil "Make abbreviations more usable." :group 'abbrev)
#@39 Hooks run when `expand.el' is loaded.
(custom-declare-variable 'expand-load-hook 'nil '(#$ . 611) :type 'hook :group 'expand)
#@68 Hooks run when an abbrev made by `expand-add-abbrevs' is expanded.
(custom-declare-variable 'expand-expand-hook 'nil '(#$ . 743) :type 'hook :group 'expand)
#@77 Hooks run by `expand-jump-to-previous-slot' and `expand-jump-to-next-slot'.
(custom-declare-variable 'expand-jump-hook 'nil '(#$ . 906) :type 'hook :group 'expand)
#@522 For loop skeleton

This is a skeleton command (see `skeleton-insert').
Normally the skeleton text is inserted at point, with nothing "inside".
If there is a highlighted region, the skeleton text is wrapped
around the region text.

A prefix argument ARG says to wrap the skeleton around the next ARG words.
A prefix argument of -1 says to wrap around region, even if not highlighted.
A prefix argument of zero says to wrap around zero words---that is, nothing.
This is a way of overriding the use of a highlighted region.
(defalias 'expand-c-for-skeleton #[(&optional str arg) "ÂÃ	#‡" [str arg skeleton-proxy-new ("Loop var: " "for(" str _ @ "=0; " str @ "; " str @ ") {" n @ _ n "}" >)] 4 (#$ . 1077) "*P\nP"])
#@50 Expansions for C mode. See `expand-add-abbrevs'.
(defconst expand-c-sample-expand-list '(("if" "if () {\n \n} else {\n \n}" (5 10 21)) ("ifn" "if () {}" (5 8)) ("uns" "unsigned ") ("for" expand-c-for-skeleton) ("switch" "switch () {\n\n}" (9 13)) ("case" "case :\n\nbreak;\n" (6 8 16)) ("do" "do {\n\n} while ();" (6 16)) ("while" "while () {\n\n}" (8 12)) ("default" "default:\n\nbreak;" 10) ("main" "int\nmain(int argc, char * argv[])\n{\n\n}\n" 37)) (#$ . 1795))
#@53 Expansions for Lisp mode. See `expand-add-abbrevs'.
(defconst expand-sample-lisp-mode-expand-list (byte-code "ÀÁÂÃÄÅÆÇ¯EÈÉÃÊËÌÍ¯EÎÏÃÐÑÒFEÓÔÕÖÅ×FEØÙÃÐÚEEÛÜÝÃÑEEÞßÂÐDEàáÑCEâãÕÊDE¯	‡" ["defu" "(defun   ()\n  \"\"\n  (interactive)\n  (let* (\n         )\n    \n    ))" 8 11 16 32 43 59 "defs" "(defsubst   ()\n  \"\"\n  (interactive)\n  )" 14 19 23 39 "defm" "(defmacro  ()\n  \"\"\n  (` \n    ))" 13 18 25 "defa" "(defadvice   (around   act)\n  \"\"\n  \n  )" 12 22 36 "defc" "(defconst   nil\n  \"\")\n" 20 "defv" "(defvar   nil\n  \"\")\n" 9 "let" "(let* (\n)\n    " "sav" "(save-excursion\n \n)" "aut" "(autoload ' \"\" t t)\n"] 12) (#$ . 2267))
#@53 Expansions for Perl mode. See `expand-add-abbrevs'.
(defconst expand-sample-perl-mode-expand-list (byte-code "ÀÁÂÃÄ\"ÅÆÇÈ‰ÉÈ‰ÊÈÅËÌÍÎ°ÏÐÑÒÓÔ¯EÕÖ×ØDEÙÚÛÜDEÝÞßØDEàáÛCEâãßCEäåßæçEEèé×EêëÛCEìí×CEîï×EðñæEòóæôDEõö×ÛDE÷ø×ôDEùúæCE¯‡" ["sub" "#" make-string 70 45 "\n" "sub   {\n" "    # DESCRIPTION\n" "    #   \n" "    # INPUT\n" "    # RETURN\n" "    local( $f ) = \"$lib.\";\n" "    local() = @_;\n" "    \n" "    \n}\n" 77 88 120 146 159 176 "for" "for (  )\n{\n\n}" 7 12 "whi" "while (  )\n{\n\n}" 9 15 "iff" "if (  )\n{\n\n}" 6 "loc" "local( $ );" "my" "my( $ );" "ope" "open(,\"\")	|| die \"$f: Can't open [$]\";" 8 36 "clo" "close ;" "def" "defined  " "und" "undef ;" "pr" "print " "pf" "printf " "gre" "grep( //, );" 11 "pus" "push( , );" "joi" "join( '', );" "rtu" "return ;"] 18) (#$ . 2921))
#@823 Add a list of abbrev to abbrev table TABLE.
ABBREVS is a list of abbrev definitions; each abbrev description entry
has the form (ABBREV EXPANSION ARG).

ABBREV is the abbreviation to replace.

EXPANSION is the replacement string or a function which will make the
expansion.  For example you, could use the DMacros or skeleton packages
to generate such functions.

ARG is an optional argument which can be a number or a list of
numbers.  If ARG is a number, point is placed ARG chars from the
beginning of the expanded text.

If ARG is a list of numbers, point is placed according to the first
member of the list, but you can visit the other specified positions
cyclicaly with the functions `expand-jump-to-previous-slot' and
`expand-jump-to-next-slot'.

If ARG is omitted, point is placed at the end of the expanded text.
(defalias 'expand-add-abbrevs #[(table abbrevs) "„ 	‡Â	@@@A@Ã@8$ˆÄ	A\"‡" [abbrevs table expand-add-abbrev 2 expand-add-abbrevs] 6 (#$ . 3726)])
#@48 Temporary variable used by the Expand package.
(defvar expand-list nil (#$ . 4704))
#@128 If non nil, stores a vector containing markers to positions defined by the last expansion.
This variable is local to a buffer.
(defvar expand-pos nil (#$ . 4795))
(make-variable-buffer-local 'expand-pos)
#@84 Index of the last marker used in `expand-pos'.
This variable is local to a buffer.
(defvar expand-index 0 (#$ . 5005))
(make-variable-buffer-local 'expand-index)
#@65 End of the expanded region.
This variable is local to a buffer.
(defvar expand-point nil (#$ . 5173))
(make-variable-buffer-local 'expand-point)
#@79 Add one abbreviation and provide the hook to move to the specified positions.
(defalias 'expand-add-abbrev #[(table abbrev expansion arg) "9… Æ!?… \nƒ, 	ƒ, \n<ƒ$ G\n@SZ‚- G\nSZ‚- ÇÈ\fÉ	\n<…C \n??…C 	G\nB9…O Æ!…O $Ê$*‡" [expansion string-exp arg position table abbrev fboundp 0 define-abbrev vector expand-abbrev-hook] 9 (#$ . 5324)])
(put 'expand-abbrev-hook 'no-self-insert t)
#@87 Abbrev hook used to do the expansion job of expand abbrevs.
See `expand-add-abbrevs'.
(defalias 'expand-abbrev-hook #[nil "l…D Å ?…D `ÆhzÇ=…C È …C 	ƒ1 É\n!ƒ( Ê	!ˆË	Æ#ˆ‚> \n<ƒ> ÌÍ\n!ÆÎÏ!ˆÐ)‡" [p expand-point expand-list expand-index expand-pos expand-in-literal nil 119 expand-do-expansion vectorp expand-build-marks indent-region 0 expand-list-to-markers run-hooks expand-expand-hook t] 4 (#$ . 5722)])
(defalias 'expand-do-expansion #[nil "ÆG!ˆ	J‰ÇH\nÈH\nÉH\nÊHƒ# cˆ`ƒ. Ë@A\"ˆ\fƒ6 Ì\f!ˆƒ?  ˆ-Í‡" [last-abbrev-text last-abbrev vect text position jump-args delete-backward-char 0 1 2 3 expand-build-list backward-char t hook expand-point] 4])
#@31 Test if an abbrev has a hook.
(defalias 'expand-abbrev-from-expand #[(word) "Ã	\"ƒ Ã	\"K† Ã\n\"… Ã\n\"K‡" [word local-abbrev-table global-abbrev-table intern-soft] 3 (#$ . 6394)])
#@27 Return the previous word.
(defalias 'expand-previous-word #[nil "Š`ÁÂ!ˆ`{*‡" [p backward-word 1] 2 (#$ . 6587)])
#@128 Move the cursor to the previous slot in the last abbrev expansion.
This is used only in conjunction with `expand-add-abbrevs'.
(defalias 'expand-jump-to-previous-slot #[nil "… 	S‰ÂWƒ GS	HbˆÃÄ!‡" [expand-pos expand-index 0 run-hooks expand-jump-hook] 3 (#$ . 6709) nil])
#@124 Move the cursor to the next slot in the last abbrev expansion.
This is used only in conjunction with `expand-add-abbrevs'.
(defalias 'expand-jump-to-next-slot #[nil "… 	T‰GYƒ Â	HbˆÃÄ!‡" [expand-pos expand-index 0 run-hooks expand-jump-hook] 3 (#$ . 6993) nil])
#@64 Build a vector of offset positions from the list of positions.
(defalias 'expand-build-list #[(len l) "Å ˆÆ!Ç	G‰\nW…# 	\f	HSZIˆT‰‚ *‡" [l expand-list lenlist i len expand-clear-markers vconcat 0] 6 (#$ . 7267)])
#@52 Transform the offsets vector into a marker vector.
(defalias 'expand-build-marks #[(p) "…, ÅÆGÇ\"GS‰ÅYƒ( \nÈ\fHZ!IˆS‰‚ )Ç‰‡" [expand-list expand-index expand-pos i p 0 make-vector nil copy-marker] 7 (#$ . 7494)])
#@33 Make the markers point nowhere.
(defalias 'expand-clear-markers #[nil "…  GS‰ÂYƒ 	HÃ‰“ˆ	S‰‚	 )Ã‰‡" [expand-pos i 0 nil] 4 (#$ . 7726)])
#@45 Test if we are in a comment or in a string.
(defalias 'expand-in-literal #[nil "ŠŠÃ ˆ`)† e`Ä`\"Å\n8ƒ Æ‚( Ç\n8ƒ' È‚( É,‡" [lim here state beginning-of-defun parse-partial-sexp 3 string 4 comment nil] 3 (#$ . 7875)])
#@82 Transform a list of markers in reverse order into a vector in the correct order.
(defalias 'expand-list-to-markers #[(l) "GS‰Ä	TÅ\"\nÆYƒ0 \nÇ@!ƒ  @‚$ È@!IˆA\nS‰‚ +‡" [l len loop v make-vector nil 0 markerp copy-marker] 5 (#$ . 8102)])
(defalias 'expand-skeleton-end-hook #[nil "… ‰‡" [skeleton-positions expand-list] 2])
(byte-code "ÀÁÂ\"ˆÃÄ!ˆÅÆ!‡" [add-hook skeleton-end-hook expand-skeleton-end-hook provide expand run-hooks expand-load-hook] 3)
