 (provide 'lse-mode)
 ;;;; THE END ;;;;
 
+

         (delete-region (match-beginning 0) (match-end 0)))))))


(defun* lse-renumber-region (start end &optional (from 1) (step 1))
  (interactive "r\nnFrom: \nnStep: ")
  (let ((linum from)
        (end (let ((m (make-marker))) (set-marker m end) m)))
    (goto-char start)
    (while (< (point) end)
      (beginning-of-line)
      (when (looking-at " *[0-9]+ *")
        (delete-region (match-beginning 0) (match-end 0)))
      (if (looking-at "*")
          (insert (format "%d" linum))
          (insert (format "%d " linum)))
      (incf linum step)
      (forward-line 1))))

;; TODO: implement a command to renumber the whole file that will
;;       update the line number in the instructions ALLER EN …,
;;       RETOUR EN …, and FAIRE … POUR





;; (defparameter lse-assign-image  

;;;;          Mick Jordan
;;;;          Peter Robinson
;;;;MODIFICATIONS
;;;;    2014-06-25 <PJB> Improved lse-renumber-region (update ALLER EN etc).
;;;;    2005-08-21 <PJB> Added header & license.
;;;;    2003-01-31 <PJB> Created, from the modula-2 mode.
;;;;BUGS
;;;;LEGAL
;;;;    GPL
;;;;    
;;;;    Copyright Pascal Bourguignon 2005 - 2014
;;;;    
;;;;    This program is free software; you can redistribute it and/or
;;;;    modify it under the terms of the GNU General Public License
