Changes

Jump to navigation Jump to search
674 bytes added ,  12:21, 12 May 2006
(backward-char 5))
(defun context-insertFLOW-FLOWshift-cells (nx y &optional beg end) (interactive "nRight: \nnDown: \nr") (save-excursion (let ((beg (if beg beg (point)))) (let ((end (if (<= (line-number-at-pos end) (+ 2 (line-number-at-pos beg))) (search-forward "\\stopFLOWchart") end))) (message "beg %s, line %s end %s, line %s" beg (line-number-at-pos beg) end (line-number-at-pos end)) (goto-char beg) (while (search-forward-regexp "{\\([0-9]+\\),\\([0-9]+\\)}" end t) (replace-match (concat "{" (number-to-string (+ (string-to-number (match-string 1)) x)) "," ;; Johan Sandblom 2006(number-to-string (+ (string-to-number (match-string 2)) y)) "}") nil nil)))))) (defun context-FLOW-01insert-28cells (%optional n)
"Insert a FLOWchart cell"
(interactive "nNumber of cells: \nP") (if (not (bolp)) (newline))
(let ((x 1))
(while (&lt;= x (if nn 1))
(insert "\\startFLOWcell\n")
(insert " \\name {}\n")
(add-hook 'ConTeXt-mode-hook
'(lambda ()
(define-key (current-local-map) "\C-cnF" 'context-FLOW-insert-FLOW-cells)
(local-set-key "\C-cnr" 'context-insert-nattab-row)
(local-set-key "\C-cnc" 'context-insert-nattab-column)
Anonymous user

Navigation menu