Replace 'let*' with 'let' wherever possible
* eat.el (eat--t-eol, eat--t-reset, eat--t-erase-in-disp) (eat--t-disable-alt-disp, eat--t-resize, eat-term-redisplay) (eat-term-input-event, eat--adjust-process-window-size): Use 'let' instead of 'let*' wherever possible. * eat.el (eat--eshell-exec-visual): Use (VAR nil) form instead of VAR form in 'let*' variable list.
This commit is contained in:
parent
499c9dd911
commit
64c537da78
1 changed files with 24 additions and 24 deletions
48
eat.el
48
eat.el
|
@ -1775,7 +1775,7 @@ Treat LINE FEED (?\\n) as the line delimiter."
|
||||||
;; Move to the beginning of line, record the point, and return that
|
;; Move to the beginning of line, record the point, and return that
|
||||||
;; point and the distance of that point from current line in lines.
|
;; point and the distance of that point from current line in lines.
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let* ((moved (eat--t-goto-eol n)))
|
(let ((moved (eat--t-goto-eol n)))
|
||||||
(cons (point) moved))))
|
(cons (point) moved))))
|
||||||
|
|
||||||
(defun eat--t-col-motion (n)
|
(defun eat--t-col-motion (n)
|
||||||
|
@ -1981,7 +1981,7 @@ Don't `set' it, bind it to a value with `let'.")
|
||||||
|
|
||||||
(defun eat--t-reset ()
|
(defun eat--t-reset ()
|
||||||
"Reset terminal."
|
"Reset terminal."
|
||||||
(let* ((disp (eat--t-term-display eat--t-term)))
|
(let ((disp (eat--t-term-display eat--t-term)))
|
||||||
;; Reset most of the things to their respective default values.
|
;; Reset most of the things to their respective default values.
|
||||||
(setf (eat--t-term-parser-state eat--t-term) nil)
|
(setf (eat--t-term-parser-state eat--t-term) nil)
|
||||||
(setf (eat--t-disp-begin disp) (point-min-marker))
|
(setf (eat--t-disp-begin disp) (point-min-marker))
|
||||||
|
@ -2783,10 +2783,10 @@ to (1, 1). When N is 3, also erase the scrollback."
|
||||||
;; Restore position.
|
;; Restore position.
|
||||||
(goto-char pos))))
|
(goto-char pos))))
|
||||||
(1
|
(1
|
||||||
(let* ((y (eat--t-cur-y cursor))
|
(let ((y (eat--t-cur-y cursor))
|
||||||
(x (eat--t-cur-x cursor))
|
(x (eat--t-cur-x cursor))
|
||||||
;; Should we erase including the cursor position?
|
;; Should we erase including the cursor position?
|
||||||
(incl-point (/= (point) (point-max))))
|
(incl-point (/= (point) (point-max))))
|
||||||
;; Delete the region to be erased.
|
;; Delete the region to be erased.
|
||||||
(delete-region (eat--t-disp-begin disp)
|
(delete-region (eat--t-disp-begin disp)
|
||||||
(if incl-point (1+ (point)) (point)))
|
(if incl-point (1+ (point)) (point)))
|
||||||
|
@ -2911,17 +2911,17 @@ If DONT-MOVE-CURSOR is non-nil, don't move cursor from current
|
||||||
position."
|
position."
|
||||||
;; Make sure we in the alternative display.
|
;; Make sure we in the alternative display.
|
||||||
(when (eat--t-term-main-display eat--t-term)
|
(when (eat--t-term-main-display eat--t-term)
|
||||||
(let* ((main-disp (eat--t-term-main-display eat--t-term))
|
(let ((main-disp (eat--t-term-main-display eat--t-term))
|
||||||
(old-y (eat--t-cur-y
|
(old-y (eat--t-cur-y
|
||||||
(eat--t-disp-cursor
|
(eat--t-disp-cursor
|
||||||
(eat--t-term-display eat--t-term))))
|
(eat--t-term-display eat--t-term))))
|
||||||
(old-x (eat--t-cur-x
|
(old-x (eat--t-cur-x
|
||||||
(eat--t-disp-cursor
|
(eat--t-disp-cursor
|
||||||
(eat--t-term-display eat--t-term))))
|
(eat--t-term-display eat--t-term))))
|
||||||
(width (eat--t-disp-width
|
(width (eat--t-disp-width
|
||||||
(eat--t-term-display eat--t-term)))
|
(eat--t-term-display eat--t-term)))
|
||||||
(height (eat--t-disp-height
|
(height (eat--t-disp-height
|
||||||
(eat--t-term-display eat--t-term))))
|
(eat--t-term-display eat--t-term))))
|
||||||
;; Delete everything.
|
;; Delete everything.
|
||||||
(delete-region (point-min) (point-max))
|
(delete-region (point-min) (point-max))
|
||||||
;; Restore the main display.
|
;; Restore the main display.
|
||||||
|
@ -4092,7 +4092,7 @@ DATA is the selection data encoded in base64."
|
||||||
;; Calculate the beginning position of display.
|
;; Calculate the beginning position of display.
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
;; TODO: This part needs explanation.
|
;; TODO: This part needs explanation.
|
||||||
(let* ((disp-begin (car (eat--t-bol (- (1- height))))))
|
(let ((disp-begin (car (eat--t-bol (- (1- height))))))
|
||||||
(when (< (eat--t-disp-begin disp) disp-begin)
|
(when (< (eat--t-disp-begin disp) disp-begin)
|
||||||
(goto-char (max (- (eat--t-disp-begin disp) 1)
|
(goto-char (max (- (eat--t-disp-begin disp) 1)
|
||||||
(point-min)))
|
(point-min)))
|
||||||
|
@ -4369,7 +4369,7 @@ you need the position."
|
||||||
"Prepare TERMINAL for displaying."
|
"Prepare TERMINAL for displaying."
|
||||||
(let ((inhibit-quit t))
|
(let ((inhibit-quit t))
|
||||||
(eat--t-with-env terminal
|
(eat--t-with-env terminal
|
||||||
(let* ((disp (eat--t-term-display eat--t-term)))
|
(let ((disp (eat--t-term-display eat--t-term)))
|
||||||
(when (< (eat--t-disp-old-begin disp)
|
(when (< (eat--t-disp-old-begin disp)
|
||||||
(eat--t-disp-begin disp))
|
(eat--t-disp-begin disp))
|
||||||
;; Join long lines.
|
;; Join long lines.
|
||||||
|
@ -4541,8 +4541,8 @@ client process may get confused."
|
||||||
(setq tmp (get char 'ascii-character))
|
(setq tmp (get char 'ascii-character))
|
||||||
(setq char tmp))))
|
(setq char tmp))))
|
||||||
(when (numberp char)
|
(when (numberp char)
|
||||||
(let* ((base (event-basic-type char))
|
(let ((base (event-basic-type char))
|
||||||
(mods (event-modifiers char)))
|
(mods (event-modifiers char)))
|
||||||
;; Try to avoid event-convert-list if possible.
|
;; Try to avoid event-convert-list if possible.
|
||||||
(if (and (characterp char)
|
(if (and (characterp char)
|
||||||
(not (memq 'meta mods))
|
(not (memq 'meta mods))
|
||||||
|
@ -5715,8 +5715,8 @@ to it."
|
||||||
|
|
||||||
PROCESS is the process whose window to resize, and WINDOWS is the list
|
PROCESS is the process whose window to resize, and WINDOWS is the list
|
||||||
of window displaying PROCESS's buffer."
|
of window displaying PROCESS's buffer."
|
||||||
(let* ((size (funcall window-adjust-process-window-size-function
|
(let ((size (funcall window-adjust-process-window-size-function
|
||||||
process windows)))
|
process windows)))
|
||||||
(when size
|
(when size
|
||||||
(let ((width (max (car size) 1))
|
(let ((width (max (car size) 1))
|
||||||
(height (max (cdr size) 1))
|
(height (max (cdr size) 1))
|
||||||
|
@ -6361,7 +6361,7 @@ allowed."
|
||||||
(defvar eshell-interpreter-alist) ; In `esh-ext'.
|
(defvar eshell-interpreter-alist) ; In `esh-ext'.
|
||||||
(require 'esh-ext)
|
(require 'esh-ext)
|
||||||
(require 'esh-util)
|
(require 'esh-util)
|
||||||
(let* (eshell-interpreter-alist
|
(let* ((eshell-interpreter-alist nil)
|
||||||
(interp (eshell-find-interpreter (car args) (cdr args)))
|
(interp (eshell-find-interpreter (car args) (cdr args)))
|
||||||
(program (car interp))
|
(program (car interp))
|
||||||
(args (flatten-tree
|
(args (flatten-tree
|
||||||
|
|
Loading…
Add table
Reference in a new issue