Changeset 4091 for trunk/lisp/skeleton.el
- Timestamp:
- 05/27/06 10:35:24 (2 years ago)
- Files:
-
- trunk/lisp/skeleton.el (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/skeleton.el
r4037 r4091 40 40 41 41 42 (defvar skeleton-transformation 'identity42 (defvar skeleton-transformation-function 'identity 43 43 "*If non-nil, function applied to literal strings before they are inserted. 44 44 It should take strings and characters and return them transformed, or nil 45 45 which means no transformation. 46 46 Typical examples might be `upcase' or `capitalize'.") 47 (defvaralias 'skeleton-transformation 'skeleton-transformation-function) 47 48 48 49 ; this should be a fourth argument to defvar 49 (put 'skeleton-transformation 'variable-interactive50 (put 'skeleton-transformation-function 'variable-interactive 50 51 "aTransformation function: ") 51 52 … … 76 77 77 78 ;;;###autoload 78 (defvar skeleton-filter 'identity79 (defvar skeleton-filter-function 'identity 79 80 "Function for transforming a skeleton proxy's aliases' variable value.") 81 (defvaralias 'skeleton-filter 'skeleton-filter-function) 80 82 81 83 (defvar skeleton-untabify t … … 158 160 Optional second argument STR may also be a string which will be the value 159 161 of `str' whereas the skeleton's interactor is then ignored." 160 (skeleton-insert (funcall skeleton-filter skeleton)162 (skeleton-insert (funcall skeleton-filter-function skeleton) 161 163 ;; Pretend C-x a e passed its prefix arg to us 162 164 (if (or arg current-prefix-arg) … … 200 202 201 203 If ELEMENT is a string or a character it gets inserted (see also 202 `skeleton-transformation '). Other possibilities are:204 `skeleton-transformation-function'). Other possibilities are: 203 205 204 206 \\n go to next line and indent according to mode … … 361 363 (delete-backward-char (- element))) 362 364 (insert (if (not literal) 363 (funcall skeleton-transformation element)365 (funcall skeleton-transformation-function element) 364 366 element)))) 365 367 ((or (eq element '\n) ; actually (eq '\n 'n) … … 465 467 466 468 467 (defvar skeleton-pair-filter (lambda () nil)469 (defvar skeleton-pair-filter-function (lambda () nil) 468 470 "Attempt paired insertion if this function returns nil, before inserting. 469 471 This allows for context-sensitive checking whether pairing is appropriate.") … … 491 493 is visible the pair is wrapped around it depending on `skeleton-autowrap'. 492 494 Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a 493 word, and if `skeleton-pair-filter ' returns nil, pairing is performed.495 word, and if `skeleton-pair-filter-function' returns nil, pairing is performed. 494 496 Pairing is also prohibited if we are right after a quoting character 495 497 such as backslash. … … 513 515 (or overwrite-mode 514 516 (if (not skeleton-pair-on-word) (looking-at "\\w")) 515 (funcall skeleton-pair-filter ))))517 (funcall skeleton-pair-filter-function)))) 516 518 (self-insert-command (prefix-numeric-value arg)) 517 519 (skeleton-insert (cons nil skeleton) (if mark -1)))))) … … 527 529 ;; (make-local-variable 'skeleton-pair) 528 530 ;; (make-local-variable 'skeleton-pair-on-word) 529 ;; (make-local-variable 'skeleton-pair-filter )531 ;; (make-local-variable 'skeleton-pair-filter-function) 530 532 ;; (make-local-variable 'skeleton-pair-alist) 531 533 ;; (setq major-mode 'mirror-mode … … 533 535 ;; skeleton-pair-on-word t 534 536 ;; ;; in the middle column insert one or none if odd window-width 535 ;; skeleton-pair-filter (lambda ()537 ;; skeleton-pair-filter-function (lambda () 536 538 ;; (if (>= (current-column) 537 539 ;; (/ (window-width) 2))
