comparison lisp/utils/skeleton.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 56c54cf7c5b6
children 1040fe1366ac
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
163 (prefix-numeric-value (or arg 163 (prefix-numeric-value (or arg
164 current-prefix-arg)) 164 current-prefix-arg))
165 (and skeleton-autowrap 165 (and skeleton-autowrap
166 (or (eq last-command 'mouse-drag-region) 166 (or (eq last-command 'mouse-drag-region)
167 (and (boundp 'transient-mark-mode) 167 (and (boundp 'transient-mark-mode)
168 (boundp 'mark-active)
169 transient-mark-mode mark-active)) 168 transient-mark-mode mark-active))
170 -1))) 169 -1)))
171 (if (stringp str) 170 (if (stringp str)
172 str)) 171 str))
173 (and skeleton-abbrev-cleanup 172 (and skeleton-abbrev-cleanup
210 (prefix-numeric-value (or arg 209 (prefix-numeric-value (or arg
211 current-prefix-arg)) 210 current-prefix-arg))
212 (and skeleton-autowrap 211 (and skeleton-autowrap
213 (or (eq last-command 'mouse-drag-region) 212 (or (eq last-command 'mouse-drag-region)
214 (and (boundp 'transient-mark-mode) 213 (and (boundp 'transient-mark-mode)
215 (boundp 'mark-active)
216 transient-mark-mode mark-active)) 214 transient-mark-mode mark-active))
217 -1))) 215 -1)))
218 (if (stringp str) 216 (if (stringp str)
219 str)) 217 str))
220 (and skeleton-abbrev-cleanup 218 (and skeleton-abbrev-cleanup
391 (signal 'quit 'recursive) 389 (signal 'quit 'recursive)
392 recursive)) 390 recursive))
393 391
394 392
395 (defun skeleton-internal-1 (element &optional literal) 393 (defun skeleton-internal-1 (element &optional literal)
396 (cond ((or (integerp element) 394 (cond ((char-or-string-p element)
397 (char-or-string-p element))
398 (if (and (integerp element) ; -num 395 (if (and (integerp element) ; -num
399 (< element 0)) 396 (< element 0))
400 (if skeleton-untabify 397 (if skeleton-untabify
401 (backward-delete-char-untabify (- element)) 398 (backward-delete-char-untabify (- element))
402 (delete-backward-char (- element))) 399 (delete-backward-char (- element)))
518 symmetrical ones, and the same character twice for the others." 515 symmetrical ones, and the same character twice for the others."
519 (interactive "*P") 516 (interactive "*P")
520 (let ((mark (and skeleton-autowrap 517 (let ((mark (and skeleton-autowrap
521 (or (eq last-command 'mouse-drag-region) 518 (or (eq last-command 'mouse-drag-region)
522 (and (boundp 'transient-mark-mode) 519 (and (boundp 'transient-mark-mode)
523 (boundp 'mark-active)
524 transient-mark-mode mark-active)))) 520 transient-mark-mode mark-active))))
525 (skeleton-end-hook)) 521 (skeleton-end-hook))
526 (if (or arg 522 (if (or arg
527 (not skeleton-pair) 523 (not skeleton-pair)
528 (and (not mark) 524 (and (not mark)