emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/mpdired 3381c37be3 046/133: kill `mpdired--previous-dir


From: ELPA Syncer
Subject: [elpa] externals/mpdired 3381c37be3 046/133: kill `mpdired--previous-directory'
Date: Sun, 10 Mar 2024 15:59:35 -0400 (EDT)

branch: externals/mpdired
commit 3381c37be39dfcd29be8049cedb40f084c0185de
Author: Manuel Giraud <manuel@ledu-giraud.fr>
Commit: Manuel Giraud <manuel@ledu-giraud.fr>

    kill `mpdired--previous-directory'
    
    There was no need for it to be saved in the buffer.
---
 mpdired.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 9ab74c1dde..8ff72340bb 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -145,8 +145,6 @@
 ;; State variables for the main buffer
 (defvar-local mpdired--directory nil
   "Current directory of the browser view.")
-(defvar-local mpdired--previous-directory nil
-  "Previous directory of the browser view.")
 (defvar-local mpdired--view nil)
 (defvar-local mpdired--comm-buffer nil
   "Communication buffer associated to this MPDired buffer.")
@@ -183,7 +181,7 @@
         (peer-localp (eq (plist-get peer-info :family) 'local))
         (main-buffer (mpdired--main-name peer-host peer-service peer-localp))
         (content (mpdired--parse-listall))
-        ascending-p)
+        ascending-p previous-directory)
     ;; Retrieve infos from this process buffer
     (with-current-buffer (process-buffer proc)
       (setq ascending-p mpdired--ascending-p))
@@ -204,14 +202,14 @@
          (mpdired--insert-entry (car (last data))))
        ;; Set mode and memorize stuff
        (mpdired-mode)
-       (if ascending-p (setq mpdired--previous-directory mpdired--directory))
+       (if ascending-p (setq previous-directory mpdired--directory))
        (setq mpdired--directory (when top top)
              mpdired--comm-buffer (process-buffer proc)
              mpdired--view 'browser)
        ;; Finally move point to the correct place.
-       (cond ((and ascending-p mpdired--previous-directory)
+       (cond ((and ascending-p previous-directory)
               (goto-char (point-min))
-              (re-search-forward mpdired--previous-directory nil t)
+              (re-search-forward previous-directory nil t)
               (goto-char (line-beginning-position))
               (setq mpdired--browser-point (point)))
              (mpdired--browser-point



reply via email to

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