;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:52:02 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/skeleton.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(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 "`skeleton.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@233 *If non-nil, function applied to literal strings before they are inserted.
It should take strings and characters and return them transformed, or nil
which means no transformation.
Typical examples might be `upcase' or `capitalize'.
(defvar skeleton-transformation nil (#$ . -619))
(put 'skeleton-transformation 'variable-interactive "aTransformation function: ")
#@455 Controls wrapping behaviour of functions created with `define-skeleton'.
When the region is visible (due to `transient-mark-mode' or marking a region
with the mouse) and this is non-`nil' and the function was called without an
explicit ARG, then the ARG defaults to -1, i.e. wrapping around the visible
region.

We will probably delete this variable in a future Emacs version
unless we get a substantial number of complaints about the auto-wrap
feature.
(defvar skeleton-autowrap t (#$ . 989))
#@141 If non-nil, make sure that the skeleton inserted ends with a newline.
This just influences the way the default `skeleton-end-hook' behaves.
(defvar skeleton-end-newline t (#$ . 1490))
#@238 Hook called at end of skeleton but before going to point of interest.
By default this moves out anything following to next line,
  unless `skeleton-end-newline' is set to nil.
The variables `v1' and `v2' are still set when calling this.
(defvar skeleton-end-hook #[nil "l\206 ?\206 \301 \207" [skeleton-end-newline newline-and-indent] 1] (#$ . 1681))
#@71 Function for transforming a skeleton proxy's aliases' variable value.
(defvar skeleton-filter 'identity (#$ . 2041))
#@70 When non-`nil' untabifies when deleting backwards with element -ARG.
(defvar skeleton-untabify t (#$ . 2164))
#@109 When non-`nil', indent rigidly under current line for element `\n'.
Else use mode's `indent-line-function'.
(defvar skeleton-newline-indent-rigidly nil (#$ . 2281))
#@240 A buffer-local varlist (see `let') of mode specific skeleton elements.
These variables are bound while interpreting a skeleton.  Their value may
in turn be any valid skeleton element if they are themselves to be used as
skeleton elements.
(defvar skeleton-further-elements nil (#$ . 2453))
(make-variable-buffer-local 'skeleton-further-elements)
#@59 *Replacement for %s in prompts of recursive subskeletons.
(defvar skeleton-subprompt (substitute-command-keys "RET, \\<minibuffer-local-map>\\[abort-recursive-edit] or \\[help-command]") (#$ . -2805))
#@69 Variable used to delete the character that led to abbrev expansion.
(defvar skeleton-abbrev-cleanup nil (#$ . 3012))
#@66 *If non-nil `define-skeleton' will override previous definition.
(defvar skeleton-debug nil (#$ . -3135))
#@206 List of positions marked with @, after skeleton insertion.
The list describes the most recent skeleton insertion, and its elements
are integer buffer positions in the reverse order of the insertion order.
(defvar skeleton-positions nil (#$ . 3248))
(byte-code "\301B\302B\303B\304B\301\207" [current-load-list skeleton skeleton-modified skeleton-point skeleton-regions] 2)
#@277 Define a user-configurable COMMAND that enters a statement skeleton.
DOCUMENTATION is that of the command, while the variable of the same name,
which contains the skeleton, has a documentation to that effect.
INTERACTOR and ELEMENT ... are as defined under `skeleton-insert'.
(defalias 'define-skeleton '(macro . #[(command documentation &rest skeleton) "\203 	\nL\210\304\305	\306\307\310\"\203 \311\202 \312\312\313R\314\315\316\nD\317BB\257D\207" [skeleton-debug command skeleton documentation progn defun (&optional str arg) string-match "\n\\>" "" "\n" "This is a skeleton command (see `skeleton-insert').\nNormally the skeleton text is inserted at point, with nothing \"inside\".\nIf there is a highlighted region, the skeleton text is wrapped\naround the region text.\n\nA prefix argument ARG says to wrap the skeleton around the next ARG words.\nA prefix argument of -1 says to wrap around region, even if not highlighted.\nA prefix argument of zero says to wrap around zero words---that is, nothing.\nThis is a way of overriding the use of a highlighted region." (interactive "*P\nP") skeleton-proxy-new quote (str arg)] 9 (#$ . 3636)]))
#@576 Insert skeleton defined by variable of same name (see `skeleton-insert').
Prefix ARG allows wrapping around words or regions (see `skeleton-insert').
If no ARG was given, but the region is visible, ARG defaults to -1 depending
on `skeleton-autowrap'.  An ARG of  M-0  will prevent this just for once.
This command can also be an abbrev expansion (3rd and 4th columns in
\[edit-abbrevs]  buffer: ""  command-name).

When called as a function, optional first argument STR may also be a string
which will be the value of `str' whereas the skeleton's interactor is then
ignored.
(defalias 'skeleton-proxy-new #[(skeleton &optional str arg) "	!\211\204 \n\306>\205k \307\310\"\211\207\311	\n\312=\206  \n\313=\211?\205Q \204/ \203: \314\2066 !\202Q \205Q \315=\204P \205Q \205Q \316;\205Y #\210\f\205k `\211\205k \317\320\304\321\322$\207" [skeleton-filter skeleton this-command buffer-undo-list skeleton-abbrev-cleanup arg (self-insert-command skeleton-pair-insert-maybe expand-abbrev) primitive-undo 1 skeleton-insert self-insert-command skeleton-pair-insert-maybe prefix-numeric-value mouse-drag-region -1 add-hook post-command-hook nil t current-prefix-arg skeleton-autowrap last-command transient-mark-mode mark-active str] 6 (#$ . 4797) "*P\nP"])
#@576 Insert skeleton defined by variable of same name (see `skeleton-insert').
Prefix ARG allows wrapping around words or regions (see `skeleton-insert').
If no ARG was given, but the region is visible, ARG defaults to -1 depending
on `skeleton-autowrap'.  An ARG of  M-0  will prevent this just for once.
This command can also be an abbrev expansion (3rd and 4th columns in
\[edit-abbrevs]  buffer: ""  command-name).

When called as a function, optional first argument STR may also be a string
which will be the value of `str' whereas the skeleton's interactor is then
ignored.
(defalias 'skeleton-proxy #[(&optional str arg) "\306\307!A@\211\310=\203 \306\311!A@\202! \312=\203! \306\313!A@	J!\211\2049 \n\314>\205\217 \315\307\"\211\202\217 \316\n\317=\206D \n\320=\211?\205u \204S \203^ \321\206Z !\202u \205u \322=\204t \205u \205u \323;\205} #\210\f\205\217 `\211\205\217 \324\325\304\326\327$)\207" [function skeleton-filter this-command buffer-undo-list skeleton-abbrev-cleanup arg backtrace-frame 1 nth 5 byte-code 2 (self-insert-command skeleton-pair-insert-maybe expand-abbrev) primitive-undo skeleton-insert self-insert-command skeleton-pair-insert-maybe prefix-numeric-value mouse-drag-region -1 add-hook post-command-hook nil t current-prefix-arg skeleton-autowrap last-command transient-mark-mode mark-active str] 6 (#$ . 6077) "*P\nP"])
#@68 Value for `post-command-hook' to remove char that expanded abbrev.
(defalias 'skeleton-abbrev-cleanup #[(&rest list) "\250\205 `|\210\301\302\303\300\304#\207" [skeleton-abbrev-cleanup nil remove-hook post-command-hook t] 4 (#$ . 7462)])
#@2939 Insert the complex statement skeleton SKELETON describes very concisely.

With optional second argument REGIONS, wrap first interesting point
(`_') in skeleton around next REGIONS words, if REGIONS is positive.
If REGIONS is negative, wrap REGIONS preceding interregions into first
REGIONS interesting positions (successive `_'s) in skeleton.

An interregion is the stretch of text between two contiguous marked
points.  If you marked A B C [] (where [] is the cursor) in
alphabetical order, the 3 interregions are simply the last 3 regions.
But if you marked B A [] C, the interregions are B-A, A-[], []-C.

The optional third argument STR, if specified, is the value for the
variable `str' within the skeleton.  When this is non-nil, the
interactor gets ignored, and this should be a valid skeleton element.

SKELETON is made up as (INTERACTOR ELEMENT ...).  INTERACTOR may be nil if
not needed, a prompt-string or an expression for complex read functions.

If ELEMENT is a string or a character it gets inserted (see also
`skeleton-transformation').  Other possibilities are:

	\n	go to next line and indent according to mode
	_	interesting point, interregion here
	>	indent line (or interregion if > _) according to major mode
	@	add position to `skeleton-positions'
	&	do next ELEMENT iff previous moved point
	|	do next ELEMENT iff previous didn't move point
	-num	delete num preceding characters (see `skeleton-untabify')
	resume:	skipped, continue here if quit is signaled
	nil	skipped

After termination, point will be positioned at the first occurrence
of _ or @ or at the end of the inserted text.

Further elements can be defined via `skeleton-further-elements'.  ELEMENT may
itself be a SKELETON with an INTERACTOR.  The user is prompted repeatedly for
different inputs.  The SKELETON is processed as often as the user enters a
non-empty string.  \[keyboard-quit] terminates skeleton insertion, but
continues after `resume:' and positions at `_' if any.  If INTERACTOR in such
a subskeleton is a prompt-string which contains a ".. %s .." it is
formatted with `skeleton-subprompt'.  Such an INTERACTOR may also be a list of
strings with the subskeleton being repeated once for each string.

Quoted Lisp expressions are evaluated for their side-effects.
Other Lisp expressions are evaluated and the value treated as above.
Note that expressions may not return `t' since this implies an
endless loop.  Modes can define other symbols by locally setting them
to any valid skeleton element.  The following local variables are
available:

	str	first time: read a string according to INTERACTOR
		then: insert previously read string once more
	help	help-form during interaction with the user or `nil'
	input	initial input (string or cons with index) while reading str
	v1, v2	local variables for memorizing anything you want

When done with skeleton, but before going back to `_'-point call
`skeleton-end-hook' if that is non-`nil'.
(defalias 'skeleton-insert #[(skeleton &optional regions str) "\211\203Q 	\306V\203 \307 \212	v\210\307 )D\202C 	[\310 \nB\307 C\211\203> 	\306V\203> \f@B	S\fA\211\204) \311\312\"*\211\203Q 	@b\203Q 	A`\313\211\211\211\211\211\211\313\314\216\315\316\317BB!.\n\207" [regions skeleton-regions mark-ring l2 l1 v2 0 point-marker mark-marker sort < nil ((byte-code "\302\303!\210\304\305!\210\306!\204 b\210\307\305!\210	\203 	b\210\302\207" [beg skeleton-point run-hooks skeleton-end-hook sit-for 0 pos-visible-in-window-p recenter] 2)) eval let ((skeleton-internal-list skeleton str)) v1 input help resume: skeleton-point skeleton-modified beg skeleton-positions skeleton-further-elements] 9 (#$ . 7712)])
#@566 Function for reading a string from the minibuffer within skeletons.

PROMPT must be a string or a form that evaluates to a string.
It may contain a `%s' which will be replaced by `skeleton-subprompt'.
If non-`nil' second arg INITIAL-INPUT or variable `input' is a string or
cons with index to insert before reading.  If third arg RECURSIVE is non-`nil'
i.e. we are handling the iterator of a subskeleton, returns empty string if
user didn't modify input.
While reading, the value of `minibuffer-help-form' is variable `help' if that
is non-nil or a default string.
(defalias 'skeleton-read #[(prompt &optional initial-input recursive) "\306\307!\203 \307J\206 \203 \310\202 \311l	\204 \312\313!\210\314\216;\2037 \315\316\f\"\2061 \317J\211\"\202: \320!+\203\\ \203W \321\230\204W \232\204W \242\232\203\\ \322\323\324\"\207\207" [recursive eolp minibuffer-help-form prompt skeleton-subprompt initial-input boundp help "As long as you provide input you will insert another subskeleton.\n\nIf you enter the empty string, the loop inserting subskeletons is\nleft, and the current one is removed as far as it has been entered.\n\nIf you quit, the current subskeleton is removed as far as it has been\nentered.  No more of the skeleton will be inserted, except maybe for a\nsyntactically necessary termination." "You are inserting a skeleton.  Standard text gets inserted into the buffer\nautomatically, and you are prompted to fill in the variable parts." open-line 1 ((byte-code "\204 \301\302!\210\301\207" [eolp delete-char 1] 2)) read-string format input eval "" signal quit t] 4 (#$ . 11397)])
(defalias 'skeleton-internal-list #[(skeleton &optional str recursive) "\212\306 \210`)i\212\307\210`){\307\f\204% \310\304\311\312@D\307FE\211A@)\313=\203D i\314 X\203D \307\315\211AA)BB`=`A\211\203Z \316\317\320\217\210\202D ,\316=\203g \321\316\322\"\207\207" [start column line opoint str skeleton beginning-of-line nil setq skeleton-read quote n current-indentation > quit (byte-code "\301@!\207" [skeleton skeleton-internal-1] 2) ((quit (byte-code "A\301=\203 \300\306\n>\202/ \307\210`|\210\fc\210\310!\210A\203* \307\307\202/ \311\300\301\"\210\307\207" [quit recursive skeleton start line column resume: nil move-to-column signal] 3))) signal recursive x skeleton-modified] 7])
(defalias 'skeleton-internal-1 #[(element &optional literal) "\306!\2031 \250\203 \307W\203 	\203 \310[!\207\311[!\207\312\n\203. \204. \n!\202/ !\207\313=\203o \f\203R A@\314=\203R l\204J \315 \210\316\317 \f@\320#\207A\204] l\203] \320\207\203i \321 \315 \210j\207\315 \210\322 \207\323=\203\214 \f\203\211 A@\314=\203\211 \316\317 \f@\320#\207\322 \207\314=\203\271 \f\203\257 \f@b\210\fAi\321 X\205\270 A@\313=\205\270 \307\207\206\270 `\211\207\324=\203\312 \205?\211A@\207\325=\203\334 ?\205?\211A@\207\326=\203\363 `B?\205?`\211\207\242\327=\203 \330A@!\207\242;\204\f\242:\2034@\2429\203\331\320\332#\2053\202@\211\2053\331@\"\210A\211\204%\320\207?\206?\333\330!\332\"\207" [element skeleton-untabify skeleton-transformation literal skeleton-regions skeleton char-or-string-p 0 backward-delete-char-untabify delete-backward-char insert-before-markers n _ newline indent-region line-beginning-position nil current-indentation indent-according-to-mode > & | @ quote eval skeleton-internal-list t skeleton-internal-1 skeleton-newline-indent-rigidly skeleton-point skeleton-modified skeleton-positions] 5])
#@184 *If this is nil pairing is turned off, no matter what else is set.
Otherwise modes with `skeleton-pair-insert-maybe' on some keys
will attempt to insert pairs of matching characters.
(defvar skeleton-pair nil (#$ . -14934))
#@73 *If this is nil, paired insertion is inhibited before or inside a word.
(defvar skeleton-pair-on-word nil (#$ . -15164))
#@149 Attempt paired insertion if this function returns nil, before inserting.
This allows for context-sensitive checking whether pairing is appropriate.
(defvar skeleton-pair-filter #[nil "\300\207" [nil] 1] (#$ . 15292))
#@284 An override alist of pairing partners matched against `last-command-char'.
Each alist element, which looks like (ELEMENT ...), is passed to
`skeleton-insert' with no interactor.  Variable `str' does nothing.

Elements might be (?` ?` _ "''"), (?\( ?  _ " )") or (?{ \n > _ \n ?} >).
(defvar skeleton-pair-alist nil (#$ . 15516))
#@629 Insert the character you type ARG times.

With no ARG, if `skeleton-pair' is non-nil, pairing can occur.  If the region
is visible the pair is wrapped around it depending on `skeleton-autowrap'.
Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a
word, and if `skeleton-pair-filter' returns nil, pairing is performed.
Pairing is also prohibited if we are right after a quoting character
such as backslash.

If a match is found in `skeleton-pair-alist', that is inserted, else
the defaults are used.  These are (), [], {}, <> and `' for the
symmetrical ones, and the same character twice for the others.
(defalias 'skeleton-pair-insert-maybe #[(arg) "\205 	\306=\206 \n\205 \307\204= \203= hz\310>\204= \204F \204= \2047 \311\312!\204=  \203F \313\314!!\202p \315\316\"\206p \317\307\236\206i \320\236\206i \321EB\205o \322\"*\207" [skeleton-autowrap last-command transient-mark-mode mark-active skeleton-end-hook mark mouse-drag-region nil (92 47) looking-at "\\w" self-insert-command prefix-numeric-value logand 255 skeleton-insert ((40 _ 41) (91 _ 93) (123 _ 125) (60 _ 62) (96 _ 39)) _ -1 arg skeleton-pair overwrite-mode skeleton-pair-on-word skeleton-pair-filter last-command-char skeleton-abbrev-cleanup skeleton-pair-alist] 5 (#$ . 15852) "*P"])
(provide 'skeleton)
