summaryrefslogtreecommitdiff
path: root/lisp/progmodes/delphi.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2011-04-22 20:44:26 +0200
committerJuanma Barranquero <lekktu@gmail.com>2011-04-22 20:44:26 +0200
commite02f48d76bfd57f014ffbe3ba56b62f2d5ccc794 (patch)
treed27a2d9fd6838d6e619c824deb12a568ceac54f6 /lisp/progmodes/delphi.el
parent7ede3b6577ae99a3e7ac45baa7cace439bf5070c (diff)
downloademacs-e02f48d76bfd57f014ffbe3ba56b62f2d5ccc794.tar.gz
lisp/progmodes/*.el: Lexical-binding cleanup.
Diffstat (limited to 'lisp/progmodes/delphi.el')
-rw-r--r--lisp/progmodes/delphi.el27
1 files changed, 11 insertions, 16 deletions
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index 0f823c806e0..c809079381f 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -328,7 +328,7 @@ routine.")
(after-change-functions nil)
(modified (buffer-modified-p)))
;; Disable any queries about editing obsolete files.
- (fset 'ask-user-about-supersession-threat (lambda (fn)))
+ (fset 'ask-user-about-supersession-threat (lambda (_fn)))
(unwind-protect
(progn ,@forms)
(set-buffer-modified-p modified)
@@ -444,6 +444,12 @@ routine.")
(goto-char curr-point)
next))
+(defvar delphi-ignore-changes t
+ "Internal flag to control if the Delphi mode responds to buffer changes.
+Defaults to t in case the `delphi-after-change' function is called on a
+non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do:
+ (let ((delphi-ignore-changes t)) ...)")
+
(defun delphi-set-text-properties (from to properties)
;; Like `set-text-properties', except we do not consider this to be a buffer
;; modification.
@@ -590,7 +596,6 @@ routine.")
;; character set.
(let ((currp (point))
(end nil)
- (start nil)
(token nil))
(goto-char p)
(when (> (skip-chars-forward charset) 0)
@@ -720,13 +725,7 @@ routine.")
(delphi-step-progress p "Fontifying" delphi-fontifying-progress-step))
(delphi-progress-done)))))
-(defvar delphi-ignore-changes t
- "Internal flag to control if the Delphi mode responds to buffer changes.
-Defaults to t in case the `delphi-after-change' function is called on a
-non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do:
- (let ((delphi-ignore-changes t)) ...)")
-
-(defun delphi-after-change (change-start change-end old-length)
+(defun delphi-after-change (change-start change-end _old-length)
;; Called when the buffer has changed. Reparses the changed region.
(unless delphi-ignore-changes
(let ((delphi-ignore-changes t)) ; Prevent recursive calls.
@@ -922,8 +921,7 @@ non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do:
;; Returns the token of the if or case statement.
(let ((token (delphi-previous-token from-else))
(token-kind nil)
- (semicolon-count 0)
- (if-count 0))
+ (semicolon-count 0))
(catch 'done
(while token
(setq token-kind (delphi-token-kind token))
@@ -971,8 +969,7 @@ non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do:
comment
;; Scan until we run out of // comments.
(let ((prev-comment comment)
- (start-comment comment)
- (kind nil))
+ (start-comment comment))
(while (let ((kind (delphi-token-kind prev-comment)))
(cond ((eq kind 'space))
((eq kind 'comment-single-line)
@@ -989,8 +986,7 @@ non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do:
comment
;; Scan until we run out of // comments.
(let ((next-comment comment)
- (end-comment comment)
- (kind nil))
+ (end-comment comment))
(while (let ((kind (delphi-token-kind next-comment)))
(cond ((eq kind 'space))
((eq kind 'comment-single-line)
@@ -1527,7 +1523,6 @@ If before the indent, the point is moved to the indent."
(interactive)
(delphi-save-match-data
(let ((marked-point (point-marker)) ; Maintain our position reliably.
- (new-point nil)
(line-start nil)
(old-indent 0)
(new-indent 0))