Remove set! on local variables. They are just ugly.
This commit is contained in:
parent
03f535f0f2
commit
cb680b277c
|
@ -42,20 +42,18 @@
|
|||
;;Layout of the directory-tree-browser
|
||||
(define layout-result-browse-dir-list
|
||||
(lambda (result-str result width directory)
|
||||
(begin
|
||||
(let ((printed-file-list (print-file-list-1 result directory))
|
||||
(heading ""))
|
||||
(begin
|
||||
(if (<= (string-length directory) (- width 25))
|
||||
(set! heading (string-append "Paths relative to "
|
||||
directory " :"))
|
||||
(let ((dir-string (substring directory
|
||||
(- (string-length directory)
|
||||
(- width 25))
|
||||
(string-length directory))))
|
||||
(set! heading (string-append "Paths relative to ..."
|
||||
dir-string))))
|
||||
(append (list heading) (list " <-") printed-file-list))))))
|
||||
(let ((printed-file-list (print-file-list-1 result directory)))
|
||||
(append
|
||||
(list
|
||||
(if (<= (string-length directory) (- width 25))
|
||||
(string-append "Paths relative to " directory " :")
|
||||
(let ((dir-string (substring directory
|
||||
(- (string-length directory)
|
||||
(- width 25))
|
||||
(string-length directory))))
|
||||
(string-append "Paths relative to ..."
|
||||
dir-string))))
|
||||
printed-file-list))))
|
||||
|
||||
|
||||
;;One File per-line
|
||||
|
@ -153,18 +151,16 @@
|
|||
((next-command-message? message)
|
||||
(let* ((command (next-command-string message))
|
||||
(parameters (next-command-message-parameters message))
|
||||
(result #f)
|
||||
(width (next-command-message-width message)))
|
||||
(if (< (length parameters) 2)
|
||||
(begin
|
||||
(set! result (list "forgot parameters?"))
|
||||
(let* ((text
|
||||
(layout-result-standard "forgot parameters?"
|
||||
result width))
|
||||
(browse-obj
|
||||
(let* ((result (list "forgot parameters?"))
|
||||
(text
|
||||
(layout-result-standard "forgot parameters?"
|
||||
result width))
|
||||
(browse-obj
|
||||
(make-browse-dir-list-res-obj 1 1 result text (cwd)
|
||||
width (cwd) '() '() #f)))
|
||||
browse-obj))
|
||||
browse-obj)
|
||||
|
||||
(let* ((file-list
|
||||
(evaluate (list-ref parameters 0)))
|
||||
|
@ -205,12 +201,11 @@
|
|||
(all-items (browse-dir-list-res-obj-file-list model)))
|
||||
(if (<= actual-pos 2)
|
||||
model
|
||||
(let ((actual-item (list-ref all-items (- actual-pos 3)))
|
||||
(actual-res-item #f))
|
||||
(begin
|
||||
(if (not (string=? (cwd) "/"))
|
||||
(set! actual-res-item (string-append (cwd) "/" actual-item))
|
||||
(set! actual-res-item (string-append "/" actual-item)))
|
||||
(let* ((actual-item (list-ref all-items (- actual-pos 3)))
|
||||
(actual-res-item
|
||||
(if (not (string=? (cwd) "/"))
|
||||
(string-append (cwd) "/" actual-item)
|
||||
(string-append "/" actual-item))))
|
||||
(if (member actual-res-item marked-items)
|
||||
model
|
||||
(let* ((new-res-marked-items (append res-marked-items
|
||||
|
@ -233,7 +228,7 @@
|
|||
new-marked-items
|
||||
new-res-marked-items
|
||||
#f)))
|
||||
new-model)))))))
|
||||
new-model))))))
|
||||
|
||||
;; user pressed 'u' --- unmark current entry
|
||||
((= key key-u)
|
||||
|
|
Loading…
Reference in New Issue