aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-indent.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <courtieu@lri.fr>2004-03-10 00:10:22 +0000
committerGravatar Pierre Courtieu <courtieu@lri.fr>2004-03-10 00:10:22 +0000
commitf5891b846727444bc428851f84860f37550194cd (patch)
treef63d4518ad850927516eb42f6b0e5c1129dd0b2c /coq/coq-indent.el
parent38e61251b417189d5d7b3cebde065754431e218c (diff)
compile warning corrections
Diffstat (limited to 'coq/coq-indent.el')
-rw-r--r--coq/coq-indent.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/coq/coq-indent.el b/coq/coq-indent.el
index c47e2afa..ab8f533d 100644
--- a/coq/coq-indent.el
+++ b/coq/coq-indent.el
@@ -132,16 +132,18 @@
(if (or (not (char-after)) (char-equal (char-after) ?\n)) t nil)
)
-(defun find-reg (limit reg)
- (if (< limit (point))
- (let (x limit) (setq limit (point)) (goto-char x)))
- (let ((pos nil))
- (while
- (and (not pos)
- (setq pos (proof-string-match reg (buffer-substring (point) limit))))
- (forward-char pos)
- (if (proof-looking-at-syntactic-context) (setq pos nil)))
- pos)
+(defun find-reg (lim reg)
+ (let ((limit lim))
+ (if (< limit (point)) ;swap limit and point
+ (let ((x limit)) (setq limit (point)) (goto-char x)))
+ (let ((pos nil))
+ (while
+ (and (not pos)
+ (setq pos (proof-string-match reg (buffer-substring (point) limit))))
+ (forward-char pos)
+ (if (proof-looking-at-syntactic-context) (setq pos nil)))
+ pos)
+ )
)
(defun coq-back-to-indentation-prevline ()
@@ -290,7 +292,7 @@
(defun coq-end-offset (&optional limit)
"Find the first unclosed open indent item, and returns its column. Stop when reaching limit (defaults tp point-min)"
(save-excursion
- (let ((found nil) (cpt 0) (found nil)
+ (let ((found nil)
(anyreg (proof-regexp-alt "\\`" proof-indent-any-regexp)))
(while
(and (not found)
@@ -363,9 +365,7 @@
(defun coq-indent-expr-offset (kind prevcol prevpoint record)
"Returns the indentation column of the current line. This function indents a *expression* line (a line inside of a command). Use `coq-indent-command-offset' to indent a line belonging to a command. The fourth argument must be t if inside the {}s of a record, nil otherwise."
- (let ((pt (point)) real-start unclosed)
- (save-excursion
- (setq unclosed (coq-find-unclosed 1 prevpoint)))
+ (let ((pt (point)) real-start)
(save-excursion
(setq real-start (coq-find-real-start)))
@@ -473,7 +473,7 @@
(defun coq-indent-offset ()
- (let ((col (current-column)) kind prevpt prevcol)
+ (let (kind prevcol prevpoint)
(save-excursion
(setq kind (coq-back-to-indentation-prevline) ;go to previous *command* (assert)
prevcol (current-column)