emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 06a7963: Remove unused vars in cl-extra.el and tram


From: Stefan Monnier
Subject: [Emacs-diffs] master 06a7963: Remove unused vars in cl-extra.el and tramp.el.
Date: Sat, 18 Mar 2017 22:32:29 -0400 (EDT)

branch: master
commit 06a796398646fd1a5e17bc7321e12ae8e061e7f7
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    Remove unused vars in cl-extra.el and tramp.el.
    
    * lisp/emacs-lisp/cl-extra.el (cl--print-table): Remove unused vars.
    
    * lisp/net/tramp.el (tramp-dissect-file-name): Remove unused `match'.
    (outline-regexp, ls-lisp-use-insert-directory-program): Declare.
    (tramp-find-foreign-file-name-handler): Mark unused arg, remove unused `v`.
---
 lisp/emacs-lisp/cl-extra.el | 14 ++++++--------
 lisp/net/tramp.el           | 12 ++++++++----
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 8b3d6ee..021ef23 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -877,16 +877,14 @@ including `cl-block' and `cl-eval-when'."
           (if (> newwidth curwidth)
               (setf (aref cols i) newwidth)))))
     (let ((formats '())
-          (tmp-head header)
           (col 0))
       (dotimes (i (length cols))
-        (let ((head (pop tmp-head)))
-          (push (concat (propertize "  "
-                                    'display
-                                    `(space :align-to ,(+ col col-space)))
-                        "%s")
-                formats)
-        (cl-incf col (+ col-space (aref cols i)))))
+        (push (concat (propertize "    "
+                                  'display
+                                  `(space :align-to ,(+ col col-space)))
+                      "%s")
+              formats)
+        (cl-incf col (+ col-space (aref cols i))))
       (let ((format (mapconcat #'identity (nreverse formats) "")))
         (insert (apply #'format format
                        (mapcar (lambda (str) (propertize str 'face 'italic))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 969092f..fdd4661 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1237,7 +1237,8 @@ values."
   (save-match-data
     (unless (tramp-tramp-file-p name)
       (tramp-compat-user-error nil "Not a Tramp file name: \"%s\"" name))
-    (let ((match (string-match (nth 0 tramp-file-name-structure) name)))
+    (if (not (string-match (nth 0 tramp-file-name-structure) name))
+        (error "`tramp-file-name-structure' didn't match!")
       (let ((method    (match-string (nth 1 tramp-file-name-structure) name))
            (user      (match-string (nth 2 tramp-file-name-structure) name))
            (host      (match-string (nth 3 tramp-file-name-structure) name))
@@ -1373,6 +1374,8 @@ Point must be at the beginning of a header line.
 The outline level is equal to the verbosity of the Tramp message."
   (1+ (string-to-number (match-string 1))))
 
+(defvar outline-regexp)
+
 (defun tramp-get-debug-buffer (vec)
   "Get the debug buffer for VEC."
   (with-current-buffer
@@ -1969,11 +1972,10 @@ ARGS are the arguments OPERATION has been called with."
    ;; Unknown file primitive.
    (t (error "unknown file I/O primitive: %s" operation))))
 
-(defun tramp-find-foreign-file-name-handler (filename &optional operation)
+(defun tramp-find-foreign-file-name-handler (filename &optional _operation)
   "Return foreign file name handler if exists."
   (when (tramp-tramp-file-p filename)
-    (let ((v (tramp-dissect-file-name filename t))
-         (handler tramp-foreign-file-name-handler-alist)
+    (let ((handler tramp-foreign-file-name-handler-alist)
          elt res)
       (while handler
        (setq elt (car handler)
@@ -2953,6 +2955,8 @@ User is always nil."
             backup-directory-alist)))
       (tramp-run-real-handler 'find-backup-file-name (list filename)))))
 
+(defvar ls-lisp-use-insert-directory-program)
+
 (defun tramp-handle-insert-directory
   (filename switches &optional wildcard full-directory-p)
   "Like `insert-directory' for Tramp files."



reply via email to

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