;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:51:15 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/skeleton.el ;;; emacs version 19.28.90.26. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/skeleton.el' was compiled for Emacs 19")) #@225 *If non-nil, function applied to 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 (#$ . -486)) (put (quote skeleton-transformation) (quote variable-interactive) "aTransformation function: ") #@67 *Replacement for %s in prompts of recursive skeleton definitions. (defvar skeleton-subprompt (substitute-command-keys "RET, \\\\[abort-recursive-edit] or \\[help-command]") (#$ . -861)) #@66 *If non-nil `define-skeleton' will override previous definition. (defvar skeleton-debug nil (#$ . -1075)) #@275 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 definition, has a documentation to that effect. PROMPT and ELEMENT ... are as defined under `skeleton-insert'. (defalias 'define-skeleton '(macro . #[(command documentation &rest definition) "ƒ \nLˆÃÄ!ˆÅÆ Ç\nDÈÉ !ÊQFË Ì ÎÏ D¯E‡" [skeleton-debug command definition require backquote progn defvar quote "*Definition for the " symbol-name " skeleton command.\nSee function `skeleton-insert' for meaning." defun nil documentation (interactive) skeleton-insert] 9 (#$ . 1188)])) #@1567 Insert the complex statement skeleton DEFINITION describes very concisely. If optional NO-NEWLINE is nil the skeleton will end on a line of its own. DEFINITION is made up as (PROMPT ELEMENT ...). PROMPT 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 align cursor > indent according to major mode < undent tab-width spaces but not beyond beginning of line _ cursor after termination & skip next ELEMENT if previous didn't move point | skip next ELEMENT if previous moved point -num delete num preceding characters resume: skipped, continue here if quit is signaled nil skipped ELEMENT may itself be DEFINITION with a PROMPT. The user is prompted repeatedly for different inputs. The DEFINITION 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 PROMPT in such a sub-definition contains a ".. %s .." it is replaced by `skeleton-subprompt'. Other lisp-expressions are evaluated and the value treated as above. The following local variables are available: str first time: read a string prompting with PROMPT and insert it if PROMPT is not a string it is evaluated instead then: insert previously read string once more quit non-nil when resume: section is entered by keyboard quit v1, v2 local variables for memorising anything you want (defalias 'skeleton-insert #[(definition &optional no-newline) "À‰‰‰‰‰‰È ‰@\"ˆ\n„)l„)Ë „)ÌÍ!ˆ …/ b.‡" [nil v2 v1 quit resume: point opoint modified skeleton-internal-list definition no-newline newline indent-relative t] 7 (#$ . 1838)]) (defalias 'skeleton-internal-read #[(str) "À\n;ƒÃÄ\n \"!‚Æ\n!)\nǘƒ ÈÉÊ\"‡\n‡" ["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." minibuffer-help-form str read-string format skeleton-subprompt eval "" signal quit t] 4]) (defalias 'skeleton-internal-list #[(definition &optional str recursive start line) "ÀÁ‡" [quit (byte-code "ŠÀyˆ`)i ŠÃˆ`){Åƃ\"ÈÉDD‚0;ƒ,Ê‚-ËDE\f`= `\fA‰ƒNÏ@!ˆ‚3‡" [0 start column nil line setq str recursive skeleton-internal-read quote read-string eval opoint modified definition skeleton-internal-1] 5) ((quit (byte-code "AÁ=„ˆ `|ˆ\fcˆÅ!ˆAÇ=?…Aƒ/A‰@É=ƒƒ9Ê!‡ …AËÀÁ\"‡" [quit recursive nil start line move-to-column column t definition resume: skeleton-internal-list signal] 3)))] 3]) (defalias 'skeleton-internal-1 #[(element) "¨ƒÁWƒÂ!‡Ã!ƒ\"\fƒ\f!‚ c‡Å=ƒ/Æ ˆÇÈ!‡É=ƒ8Ê ‡Ë=ƒEÌ i^!‡Î=ƒU† `‰‡Ð=ƒg… A‰‡Ó=ƒy† A‰‡:ƒ–@;„Š@:ƒ–Ô‰@È#… ‚Š?† ÕÖ!!‡" [element 0 delete-char char-or-string-p skeleton-transformation n newline indent-relative t > indent-for-tab-command < backward-delete-char-untabify tab-width _ point & modified definition | skeleton-internal-list skeleton-internal-1 eval] 4]) #@141 *If this is nil pairing is turned off, no matter what else is set. Otherwise modes with `pair-insert-maybe' on some keys will attempt this. (defvar pair nil (#$ . -5224)) #@67 *If this is nil pairing is not attempted before or inside a word. (defvar pair-on-word nil (#$ . -5401)) #@140 Attempt pairing if this function returns nil, before inserting. This allows for context-sensitive checking whether pairing is appropriate. (defvar pair-filter #[nil "À‡" [nil] 1] (#$ . 5513)) #@281 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 prompt. Variable `str' does nothing. Elements might be (?` ?` _ "''"), (?\( ? _ " )") or (?{ \n > _ \n < ?}). (defvar pair-alist nil (#$ . 5712)) #@394 Insert the character you type ARG times. With no ARG, if `pair' is non-nil, and if `pair-on-word' is non-nil or we are not before or inside a word, and if `pair-filter' returns nil, pairing is performed. If a match is found in `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 'pair-insert-maybe #[(arg) "„ ƒ\n„ÃÄ!„ ƒÆÇ!!‡cˆ ž‰ƒ0ÊË\"‡ŠÌžA†;c)‡" [arg pair pair-on-word looking-at "\\w" pair-filter self-insert-command prefix-numeric-value last-command-char pair-alist skeleton-insert t ((40 . 41) (91 . 93) (123 . 125) (60 . 62) (96 . 39))] 3 (#$ . 6035) "*P"])