* lisp: Remove yet more always-nil variables

* lisp/align.el (align-region):
Remove always-nil variable `group-c`.
* lisp/ido.el (ido-make-prompt): Remove always-nil variable `prefix`.

* lisp/xdg.el (xdg-mime-collect-associations):
Remove always-nil variable `end`.

* lisp/calc/calc-yank.el (calc-edit):
Remove always-nil variable `flag`.

* lisp/calendar/todo-mode.el (todo-edit-item--header):
Remove always-nil variable `dayname`.
(todo-show-categories-table):
Remove always-nil variable `sortkey`.

* lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-docstring-engine):
Remove always-nil variable `err`.

* lisp/emacs-lisp/tcover-ses.el: Remove always-nil variable `pause`.

* lisp/eshell/em-ls.el (eshell-ls-files):
Remove always-nil variable `ignore`.

* lisp/net/ange-ftp.el (ange-ftp-copy-file-internal): Remove always-nil
variable `temp2`.

* lisp/progmodes/cperl-mode.el (cperl-tags-hier-init): Remove
always-nil variables `l1`, `l2`, `l3`.
(cperl-tags-treeify): Remove always-nil variable `l1`.

* lisp/progmodes/ebrowse.el (ebrowse-tags-read-member+class-name):
Remove always-nil variable `class`.

* lisp/textmodes/artist.el (artist-draw-ellipse-with-0-height):
Remove always-nil variable `fill-info`.

* lisp/textmodes/flyspell.el (flyspell-emacs-popup):
Remove always-nil variable `show-affix-info`.

* lisp/textmodes/rst.el (rst-Ado):
Remove always-nil variable `char`.

* lisp/vc/vc.el (vc-diff-build-argument-list-internal):
Remove always-nil variable `rev2-default`.
This commit is contained in:
Stefan Monnier 2021-03-11 13:29:14 -05:00
parent fe844299a4
commit b21f6193fe
15 changed files with 38 additions and 36 deletions

View file

@ -1310,7 +1310,7 @@ aligner would have dealt with are."
(thissep (if rulesep (cdr rulesep) separate))
same (eol 0)
search-start
groups group-c
groups ;; group-c
spacing spacing-c
tab-stop tab-stop-c
repeat repeat-c
@ -1434,7 +1434,7 @@ aligner would have dealt with are."
;; lookup the `group' attribute the first time
;; that we need it
(unless group-c
(unless nil ;; group-c
(setq groups (or (cdr (assq 'group rule)) 1))
(unless (listp groups)
(setq groups (list groups)))

View file

@ -639,7 +639,7 @@ Interactively, reads the register using `register-read-with-preview'."
(calc-slow-wrapper
(when (eq n 0)
(setq n (calc-stack-size)))
(let* ((flag nil)
(let* (;; (flag nil)
(allow-ret (> n 1))
(list (math-showing-full-precision
(mapcar (if (> n 1)
@ -651,7 +651,8 @@ Interactively, reads the register using `register-read-with-preview'."
(if (> n 0)
(calc-top-list n)
(calc-top-list 1 (- n)))))))
(calc--edit-mode (lambda () (calc-finish-stack-edit (or flag n))) allow-ret)
(calc--edit-mode (lambda () (calc-finish-stack-edit n)) ;; (or flag n)
allow-ret)
(while list
(insert (car list) "\n")
(setq list (cdr list)))))

View file

@ -2279,7 +2279,7 @@ made in the number or names of categories."
(inc (prefix-numeric-value inc))
(buffer-read-only nil)
ndate ntime
year monthname month day dayname)
year monthname month day) ;; dayname
(when marked (todo--user-error-if-marked-done-item))
(save-excursion
(or (and marked (goto-char (point-min))) (todo-item-start))
@ -2437,7 +2437,7 @@ made in the number or names of categories."
(monthname monthname)
(month month)
(day day)
(dayname dayname))
(dayname nil)) ;; dayname
(mapconcat #'eval calendar-date-display-form "")))))
(when ndate (replace-match ndate nil nil nil 1))
;; Add new time string to the header, if it was supplied.
@ -3450,8 +3450,8 @@ containing only archived items, provided user option
are shown in `todo-archived-only' face."
(interactive)
(todo-display-categories)
(let (sortkey)
(todo-update-categories-display sortkey)))
;; (let (sortkey)
(todo-update-categories-display nil)) ;; sortkey
(defun todo-next-button (n)
"Move point to the Nth next button in the table of categories."

View file

@ -2134,8 +2134,8 @@ buffer, otherwise stop after the first error."
(user-error "No spellchecker installed: check the variable `ispell-program-name'"))
(save-excursion
(skip-chars-forward "^a-zA-Z")
(let (word sym case-fold-search err word-beginning word-end)
(while (and (not err) (< (point) end))
(let (word sym case-fold-search word-beginning word-end) ;; err
(while (and (< (point) end)) ;; (not err)
(if (save-excursion (forward-char -1) (looking-at "[('`]"))
;; Skip lists describing meta-syntax, or bound variables
(forward-sexp 1)
@ -2167,7 +2167,7 @@ buffer, otherwise stop after the first error."
(sit-for 0)
(message "Continuing..."))))))))
(skip-chars-forward "^a-zA-Z"))
err))))
nil)))) ;; err
;;; Rogue space checking engine
;;

View file

@ -32,8 +32,8 @@
;;;Here are some macros that exercise SES. Set `pause' to t if you want the
;;;macros to pause after each step.
(let* ((pause nil)
(x (if pause "\^Xq" ""))
(let* (;; (pause nil)
(x (if nil "\^Xq" "")) ;; pause
(y "\^X\^Fses-test.ses\r\^[<"))
;;Fiddle with the existing spreadsheet
(fset 'ses-exercise-example

View file

@ -680,12 +680,12 @@ Each member of FILES is either a string or a cons cell of the form
(let ((f files)
last-f
display-files
ignore)
) ;; ignore
(while f
(if (cdar f)
(setq last-f f
f (cdr f))
(unless ignore
(unless nil ;; ignore
(funcall error-func
(format "%s: No such file or directory\n" (caar f))))
(if (eq f files)
@ -698,7 +698,7 @@ Each member of FILES is either a string or a cons cell of the form
(setcar f (cadr f))
(setcdr f (cddr f))))))
(if (not show-size)
(setq display-files (mapcar 'eshell-ls-annotate files))
(setq display-files (mapcar #'eshell-ls-annotate files))
(dolist (file files)
(let* ((str (eshell-ls-printable-size (file-attribute-size (cdr file)) t))
(len (length str)))

View file

@ -1746,7 +1746,7 @@ is enabled then some keybindings are changed in the keymap."
ido-max-file-prompt-width))
(literal (and (boundp 'ido-find-literal) ido-find-literal "(literal) "))
(vc-off (and ido-saved-vc-hb (not vc-handled-backends) "[-VC] "))
(prefix nil)
;; (prefix nil)
(rule ido-rewrite-file-prompt-rules))
(let ((case-fold-search nil))
(while rule
@ -1762,7 +1762,7 @@ is enabled then some keybindings are changed in the keymap."
; (if ido-process-ignore-lists "" "&")
(or literal "")
(or vc-off "")
(or prefix "")
;; (or prefix "")
(let ((l (length dirname)))
(if (and max-width (> max-width 0) (> l max-width))
(let* ((s (substring dirname (- max-width)))

View file

@ -3716,7 +3716,7 @@ so return the size on the remote host exactly. See RFC 3659."
(binary (or (ange-ftp-binary-file filename)
(ange-ftp-binary-file newname)))
temp1
temp2)
) ;; temp2
;; check to see if we can overwrite
(if (or (not ok-if-already-exists)
@ -3750,7 +3750,7 @@ so return the size on the remote host exactly. See RFC 3659."
filename newname binary msg
f-parsed f-host f-user f-name f-abbr
t-parsed t-host t-user t-name t-abbr
temp1 temp2 cont nowait)
temp1 nil cont nowait) ;; temp2
nowait))
;; filename wasn't remote. newname must be remote. call the

View file

@ -6701,9 +6701,9 @@ One may build such TAGS files from CPerl mode menu."
(or (nthcdr 2 elt)
;; Only in one file
(setcdr elt (cdr (nth 1 elt))))))
to l1 l2 l3)
to) ;; l1 l2 l3
;; (setq cperl-hierarchy '(() () ())) ; Would write into '() later!
(setq cperl-hierarchy (list l1 l2 l3))
(setq cperl-hierarchy (list () () ())) ;; (list l1 l2 l3)
(or tags-table-list
(call-interactively 'visit-tags-table))
(mapc
@ -6749,7 +6749,7 @@ One may build such TAGS files from CPerl mode menu."
"\\)\\(::\\)?"))
(packages (cdr (nth 1 to)))
(methods (cdr (nth 2 to)))
l1 head cons1 cons2 ord writeto recurse
head cons1 cons2 ord writeto recurse ;; l1
root-packages root-functions
(move-deeper
(lambda (elt)
@ -6769,7 +6769,7 @@ One may build such TAGS files from CPerl mode menu."
(setq root-functions (cons elt root-functions)))
(t
(setq root-packages (cons elt root-packages)))))))
(setcdr to l1) ; Init to dynamic space
(setcdr to nil) ;; l1 ; Init to dynamic space
(setq writeto to)
(setq ord 1)
(mapc move-deeper packages)

View file

@ -3184,8 +3184,8 @@ MEMBER-NAME is the name of the member found."
(let* ((start (point))
(name (progn (skip-chars-forward "a-zA-Z0-9_")
(buffer-substring start (point))))
class)
(list class name))))
) ;; class
(list nil name)))) ;; class
(defun ebrowse-tags-choose-class (_tree header name initial-class-name)

View file

@ -3466,7 +3466,7 @@ The Y-RADIUS must be 0, but the X-RADIUS must not be 0."
(line-char (if artist-line-char-set artist-line-char ?-))
(i 0)
(point-list nil)
(fill-info nil)
;; (fill-info nil)
(shape-info (make-vector 2 0)))
(while (< i width)
(let* ((line-x (+ left-edge i))
@ -3479,7 +3479,7 @@ The Y-RADIUS must be 0, but the X-RADIUS must not be 0."
(setq point-list (append point-list (list new-coord)))
(setq i (1+ i))))
(aset shape-info 0 point-list)
(aset shape-info 1 fill-info)
(aset shape-info 1 nil) ;; fill-info
(artist-make-2point-object (artist-make-endpoint x1 y1)
(artist-make-endpoint x-radius y-radius)
shape-info)))

View file

@ -2293,8 +2293,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
corrects)
'()))
(affix (car (cdr (cdr (cdr poss)))))
show-affix-info
(base-menu (let ((save (if (and (consp affix) show-affix-info)
;; show-affix-info
(base-menu (let ((save (if nil ;; (and (consp affix) show-affix-info)
(list
(list (concat "Save affix: " (car affix))
'save)

View file

@ -616,7 +616,7 @@ After interpretation of ARGS the results are concatenated as for
(:constructor
rst-Ado-new-transition
(&aux
(char nil)
;; (char nil)
(-style 'transition)))
;; Construct a simple section header.
(:constructor

View file

@ -1832,7 +1832,7 @@ Return t if the buffer had changes, nil otherwise."
(backend (car vc-fileset))
(first (car files))
(rev1-default nil)
(rev2-default nil))
) ;; (rev2-default nil)
(cond
;; someday we may be able to do revision completion on non-singleton
;; filesets, but not yet.
@ -1856,9 +1856,10 @@ Return t if the buffer had changes, nil otherwise."
rev1-default "): ")
"Older revision: "))
(rev2-prompt (concat "Newer revision (default "
(or rev2-default "current source") "): "))
;; (or rev2-default
"current source): "))
(rev1 (vc-read-revision rev1-prompt files backend rev1-default))
(rev2 (vc-read-revision rev2-prompt files backend rev2-default)))
(rev2 (vc-read-revision rev2-prompt files backend nil))) ;; rev2-default
(when (string= rev1 "") (setq rev1 nil))
(when (string= rev2 "") (setq rev2 nil))
(list files rev1 rev2))))

View file

@ -256,8 +256,8 @@ which is expected to be ordered by priority as in
(when (file-readable-p f)
(insert-file-contents-literally f nil nil nil t)
(goto-char (point-min))
(let (end)
(while (not (or (eobp) end))
(let () ;; end
(while (not (or (eobp))) ;; end
(if (= (following-char) ?\[)
(progn (setq sec (char-after (1+ (point))))
(forward-line))