aboutsummaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorRamiro Leal-Cavazos <ramiroleal050@gmail.com>2021-04-11 12:31:32 -0700
committerGitHub <noreply@github.com>2021-04-11 21:31:32 +0200
commit38d15c98316359c7b0b190f2245a3b2e2bf62109 (patch)
tree3cad1fa51d92a1ed36d0a72987c759cc09a1c4df /elisp
parent9d959abd39cd787fa7b5d68327d19d3972fe888e (diff)
downloadpylint-38d15c98316359c7b0b190f2245a3b2e2bf62109.tar.gz
fix emacs pylint error when running with tramp (#4333)
* Fixed bug when accessing `tramp-file-name` localname field * Fixed emacs bug when getting localname of of remote files
Diffstat (limited to 'elisp')
-rw-r--r--elisp/pylint.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/elisp/pylint.el b/elisp/pylint.el
index d27a92b14..327da0fcb 100644
--- a/elisp/pylint.el
+++ b/elisp/pylint.el
@@ -202,8 +202,9 @@ output buffer, to go to the lines where pylint found matches.
(save-some-buffers (not pylint-ask-about-save) nil)
(let* ((filename (buffer-file-name))
+ (localname-offset (cl-struct-slot-offset 'tramp-file-name 'localname))
(filename (or (and (tramp-tramp-file-p filename)
- (aref (tramp-dissect-file-name filename) 3))
+ (elt (tramp-dissect-file-name filename) localname-offset))
filename))
(filename (shell-quote-argument filename))
(pylint-command (if arg