comparison lisp/vm/vm-misc.el @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents 441bb1e64a06
children c53a95d3c46d
comparison
equal deleted inserted replaced
29:7976500f47f9 30:ec9a17fef872
216 (if (< vlength length) 216 (if (< vlength length)
217 (apply 'vector (nconc (vm-vector-to-list vector) 217 (apply 'vector (nconc (vm-vector-to-list vector)
218 (make-list (- length vlength) fill))) 218 (make-list (- length vlength) fill)))
219 vector ))) 219 vector )))
220 220
221 (defun vm-obarray-to-string-list (obarray) 221 (defun vm-obarray-to-string-list (blobarray)
222 (let ((list nil)) 222 (let ((list nil))
223 (mapatoms (function (lambda (s) (setq list (cons (symbol-name s) list)))) 223 (mapatoms (function (lambda (s) (setq list (cons (symbol-name s) list))))
224 obarray) 224 blobarray)
225 list )) 225 list ))
226 226
227 (defun vm-mapcar (function &rest lists) 227 (defun vm-mapcar (function &rest lists)
228 (let (arglist result) 228 (let (arglist result)
229 (while (car lists) 229 (while (car lists)
540 540
541 (if (fboundp 'overlay-put) 541 (if (fboundp 'overlay-put)
542 (fset 'vm-set-extent-property 'overlay-put) 542 (fset 'vm-set-extent-property 'overlay-put)
543 (fset 'vm-set-extent-property 'set-extent-property)) 543 (fset 'vm-set-extent-property 'set-extent-property))
544 544
545 (if (fboundp 'move-overlay)
546 (fset 'vm-set-extent-endpoints 'move-overlay)
547 (fset 'vm-set-extent-endpoints 'set-extent-endpoints))
548
545 (if (fboundp 'make-overlay) 549 (if (fboundp 'make-overlay)
546 (fset 'vm-make-extent 'make-overlay) 550 (fset 'vm-make-extent 'make-overlay)
547 (fset 'vm-make-extent 'make-extent)) 551 (fset 'vm-make-extent 'make-extent))
548 552
549 (if (fboundp 'overlay-end) 553 (if (fboundp 'overlay-end)
672 (if (and (equal 0 (string-match elt (car list))) 676 (if (and (equal 0 (string-match elt (car list)))
673 (= (match-end 0) (length (car list)))) 677 (= (match-end 0) (length (car list))))
674 (setq found t) 678 (setq found t)
675 (setq list (cdr list)))) 679 (setq list (cdr list))))
676 list)) 680 list))
681
682 (defmacro vm-assert (expression)
683 (list 'or expression
684 (list 'progn
685 (list 'setq 'debug-on-error t)
686 (list 'error "assertion failed: %S"
687 (list 'quote expression)))))