emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b21f619: * lisp: Remove yet more always-nil variables


From: Stefan Monnier
Subject: master b21f619: * lisp: Remove yet more always-nil variables
Date: Thu, 11 Mar 2021 13:29:21 -0500 (EST)

branch: master
commit b21f6193fe1b92382bf7efbd9d44eba0613f3168
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * 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`.
---
 lisp/align.el                 | 4 ++--
 lisp/calc/calc-yank.el        | 5 +++--
 lisp/calendar/todo-mode.el    | 8 ++++----
 lisp/emacs-lisp/checkdoc.el   | 6 +++---
 lisp/emacs-lisp/tcover-ses.el | 4 ++--
 lisp/eshell/em-ls.el          | 6 +++---
 lisp/ido.el                   | 4 ++--
 lisp/net/ange-ftp.el          | 4 ++--
 lisp/progmodes/cperl-mode.el  | 8 ++++----
 lisp/progmodes/ebrowse.el     | 4 ++--
 lisp/textmodes/artist.el      | 4 ++--
 lisp/textmodes/flyspell.el    | 4 ++--
 lisp/textmodes/rst.el         | 2 +-
 lisp/vc/vc.el                 | 7 ++++---
 lisp/xdg.el                   | 4 ++--
 15 files changed, 38 insertions(+), 36 deletions(-)

diff --git a/lisp/align.el b/lisp/align.el
index 1a1d3dd..7ae067f 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -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)))
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index e5f0523..762adbd 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -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)))))
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 0daa153..dab468d 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -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."
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index ee2e774..6285166 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -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
 ;;
diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el
index 12b0dcf..d9db1d3 100644
--- a/lisp/emacs-lisp/tcover-ses.el
+++ b/lisp/emacs-lisp/tcover-ses.el
@@ -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
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index e942ae2..3d7c43b 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -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)))
diff --git a/lisp/ido.el b/lisp/ido.el
index 3ed0d95..9362904 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -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)))
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index d27eeab..86b5d44 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -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
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 649eff1..734797b 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -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)
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 40bdaad..cafdb3b 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -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)
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index 9a886d2..3d08122 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -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)))
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 83dba71..a48b345 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -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)
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index c51285d..ce15637 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -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
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b926c38..95126fa 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -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))))
diff --git a/lisp/xdg.el b/lisp/xdg.el
index 0f0df53..1103949 100644
--- a/lisp/xdg.el
+++ b/lisp/xdg.el
@@ -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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]